APE Price: $1.17 (+5.60%)

Contract

0xAF51497AE4DFAf499f3295c138A296819D518fA2

Overview

APE Balance

Apechain LogoApechain LogoApechain Logo0 APE

APE Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040488022024-10-05 15:11:3046 days ago1728141090IN
 Create: PufflesERC1155
0 APE0.1097674525.42069

Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PufflesERC1155

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 28 : PufflesERC1155.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/common/ERC2981Upgradeable.sol";
import "operator-filter-registry/src/upgradeable/OperatorFiltererUpgradeable.sol";
import "./ICommon.sol";

struct TokenSettings {
    /// @dev total number of tokens that can be minted
    uint32 maxSupply;
    /// @dev total number of tokens that can be minted per wallet
    uint32 maxPerWallet;
    /// @dev tracks the total amount that have been minted
    uint32 amountMinted;
    /// @dev merkle root associated with claiming the token, otherwise bytes32(0)
    bytes32 merkleRoot;
    /// @dev timestamp of when the token can be minted
    uint32 mintStart;
    /// @dev timestamp of when the token can no longer be minted
    uint32 mintEnd;
    /// @dev price for the phase
    uint256 price;
    /// @dev optional revenue splitting settings
    PaymentSplitterSettings paymentSplitterSettings;
}

struct TokenData {
    TokenSettings settings;
    uint256 index;
}

error TokenSettingsLocked();
error TokenAlreadyExists();
error InvalidPaymentSplitterSettings();
error TooManyTokens();
error InvalidToken();
error MintNotActive();
error InvalidMintDates();

/// @author Lazydevpro
/// @title Puffles ERC1155 Contract
contract PufflesERC1155 is
    ERC1155SupplyUpgradeable,
    OwnableUpgradeable,
    ERC2981Upgradeable,
    OperatorFiltererUpgradeable
{
    string public name;
    string public symbol;
    uint256 private _currentTokenId;
    bool private allowBurning;

    /// @dev maps the token ID (eg 1, 2 ...n) to the token's minting settings
    mapping(uint256 => TokenSettings) private _tokens;
    /// @dev track how many mints a particular wallet has made for a given token
    mapping(uint256 => mapping(address => uint64))
        private _mintBalanceByTokenId;
    /// @dev track how much revenue each payee has earned
    mapping(address => uint256) private _revenueByAddress;
    /// @dev track how much revenue has been released to each address
    mapping(address => uint256) private _released;
    /// @dev track how much revenue has been released in total
    uint256 private _totalReleased;
    /// @dev "fallback" payment splitter settings in case token-level settings aren't specified
    PaymentSplitterSettings private _fallbackPaymentSplitterSettings;

    event RoyaltyUpdated(address royaltyAddress, uint96 royaltyAmount);
    event TokenRoyaltyUpdated(
        uint256 tokenId,
        address royaltyAddress,
        uint96 royaltyAmount
    );
    event TokenCreated(string indexed uuid, uint256 indexed tokenId);
    event BurnStatusChanged(bool burnActive);
    event TokensAirdropped(uint256 numRecipients, uint256 numTokens);
    event TokenBurned(address indexed owner, uint256 tokenId, uint256 amount);
    event PaymentReleased(address to, uint256 amount);
    event TokenSettingsUpdated(uint256 tokenId);
    event RevenueSettingsUpdated(uint256 tokenId);
    event FallbackRevenueSettingsUpdated();
    event TokensMinted(address indexed to, uint256 tokenId, uint256 quantity);
    event TokenSupplyCapped(uint256 tokenId, uint256 maxSupply);

    /// @custom:oz-upgrades-unsafe-allow constructor
    constructor() {
        _disableInitializers();
    }

    function initialize(
        string memory _name,
        string memory _symbol,
        string memory _baseUri,
        TokenSettings[] calldata _tokenSettings,
        RoyaltySettings calldata _royaltySettings,
        PaymentSplitterSettings calldata _paymentSplitterSettings,
        bool _allowBurning,
        address _deployer,
        address _operatorFilter
    ) public initializer {
        __ERC1155_init(_baseUri);
        __Ownable_init(msg.sender);

        uint256 numTokens = _tokenSettings.length;

        // set a reasonable maximum here so we don't run out of gas
        if (numTokens > 100) {
            revert TooManyTokens();
        }

        // verify fallback (contract-level) payment splitter settings
        _verifyPaymentSplitterSettings(_paymentSplitterSettings);

        for (uint256 i = 0; i < numTokens; ) {
            // verify token-level payment splitter settings, if present
            if (_tokenSettings[i].paymentSplitterSettings.payees.length > 0) {
                _verifyPaymentSplitterSettings(
                    _tokenSettings[i].paymentSplitterSettings
                );
            }

            _verifyMintingTime(
                _tokenSettings[i].mintStart,
                _tokenSettings[i].mintEnd
            );

            _tokens[i] = _tokenSettings[i];

            // this value should always be 0 for new tokens
            _tokens[i].amountMinted = 0;

            // numTokens has a maximum value of 2^256 - 1
            unchecked {
                ++i;
            }
        }

        _currentTokenId = numTokens;
        _fallbackPaymentSplitterSettings = _paymentSplitterSettings;
        name = _name;
        symbol = _symbol;
        allowBurning = _allowBurning;

        _setDefaultRoyalty(
            _royaltySettings.royaltyAddress,
            _royaltySettings.royaltyAmount
        );
        _transferOwnership(_deployer);
        OperatorFiltererUpgradeable.__OperatorFilterer_init(
            _operatorFilter,
            _operatorFilter == address(0) ? false : true // only subscribe if a filter is provided
        );
    }

    /*//////////////////////////////////////////////////////////////
                           CREATOR FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    /**
     * @notice Create a new token to be minted with the provided settings.
     */
    function createDropToken(
        TokenSettings calldata settings
    ) external onlyOwner {
        if (settings.paymentSplitterSettings.payees.length > 0) {
            _verifyPaymentSplitterSettings(settings.paymentSplitterSettings);
        }

        _verifyMintingTime(settings.mintStart, settings.mintEnd);

        uint256 id = _currentTokenId;

        _tokens[id] = settings;
        // this value should always be 0 for new tokens
        _tokens[id].amountMinted = 0;

        ++_currentTokenId;

    }

    /**
     * @notice Create multiple tokens to be minted with the provided settings.
     */
    function createDropTokens(
        TokenSettings[] calldata tokenSettings
    ) external onlyOwner {
        uint256 numTokens = tokenSettings.length;
        uint256 currentTokenId = _currentTokenId;

        for (uint256 i = 0; i < numTokens; ) {
            if (tokenSettings[i].paymentSplitterSettings.payees.length > 0) {
                _verifyPaymentSplitterSettings(
                    tokenSettings[i].paymentSplitterSettings
                );
            }

            TokenSettings memory settings = tokenSettings[i];

            _verifyMintingTime(settings.mintStart, settings.mintEnd);

            uint256 id = currentTokenId;

            // this value should always be 0 for new tokens
            settings.amountMinted = 0;
            _tokens[id] = settings;

            ++currentTokenId;

            // numTokens has a maximum value of 2^256 - 1
            unchecked {
                ++i;
            }

        }

        _currentTokenId = currentTokenId;
    }

    /**
     * @notice Update the settings for a token. Certain settings cannot be changed once a token has been minted.
     */
    function updateTokenSettingsByIndex(
        uint256 id,
        TokenSettings calldata settings
    ) external onlyOwner {
        // cannot edit a token larger than the current token ID
        if (id >= _currentTokenId) {
            revert InvalidToken();
        }

        TokenSettings memory token = _tokens[id];
        uint32 existingAmountMinted = token.amountMinted;
        PaymentSplitterSettings memory existingPaymentSplitterSettings = token
            .paymentSplitterSettings;

        // Once a token has been minted, it's not possible to change the supply & start/end times
        if (
            existingAmountMinted > 0 &&
            (settings.maxSupply != token.maxSupply ||
                settings.mintStart != token.mintStart ||
                settings.mintEnd != token.mintEnd)
        ) {
            revert TokenSettingsLocked();
        }

        _verifyMintingTime(settings.mintStart, settings.mintEnd);

        _tokens[id] = settings;

        // it's not possible to update how many have been claimed, but it's part of the TokenSettings struct
        // ignore any value that is passed in and use the existing value
        _tokens[id].amountMinted = existingAmountMinted;

        // payment splitter settings can only be updated via `updatePaymentSplitterSettingsByIndex`
        _tokens[id].paymentSplitterSettings = existingPaymentSplitterSettings;

        emit TokenSettingsUpdated(id);
    }

    function updatePaymentSplitterSettingsByIndex(
        uint256 id,
        PaymentSplitterSettings calldata settings
    ) external onlyOwner {
        // cannot edit a token larger than the current token ID
        if (id >= _currentTokenId) {
            revert InvalidToken();
        }

        // revenue split cannot be changed once a token is minted
        if (_tokens[id].amountMinted > 0) {
            revert TokenSettingsLocked();
        }

        _verifyPaymentSplitterSettings(settings);

        _tokens[id].paymentSplitterSettings = settings;

        emit RevenueSettingsUpdated(id);
    }

    function updateFallbackPaymentSplitterSettings(
        PaymentSplitterSettings calldata settings
    ) external onlyOwner {
        _verifyPaymentSplitterSettings(settings);

        _fallbackPaymentSplitterSettings = settings;

        emit FallbackRevenueSettingsUpdated();
    }

    function _verifyMintingTime(uint32 mintStart, uint32 mintEnd) private view {
        if (mintEnd > 0) {
            // mint end must be after mint start
            if (mintEnd < mintStart) {
                revert InvalidMintDates();
            }

            // mint end must be in the future
            if (mintEnd < block.timestamp) {
                revert InvalidMintDates();
            }
        }
    }

    function _verifyPaymentSplitterSettings(
        PaymentSplitterSettings calldata settings
    ) private pure {
        uint256 shareTotal;
        uint256 numPayees = settings.payees.length;

        // we discourage using the payment splitter for more than 4 payees, as it's not gas efficient for minting
        // more advanced use-cases should consider a multi-sig payee
        if (numPayees != settings.shares.length || numPayees > 4) {
            revert InvalidPaymentSplitterSettings();
        }

        for (uint256 i = 0; i < numPayees; ) {
            uint256 shares = settings.shares[i];

            if (shares == 0) {
                revert InvalidPaymentSplitterSettings();
            }

            shareTotal += shares;

            // this can't overflow as numPayees is capped at 4
            unchecked {
                ++i;
            }
        }

        if (shareTotal != 100) {
            revert InvalidPaymentSplitterSettings();
        }
    }

    /**
     * @notice Perform a batch airdrop of tokens to a list of recipients
     */
    function airdropToken(
        uint256 id,
        uint32[] calldata quantities,
        address[] calldata recipients
    ) external onlyOwner {
        if (id >= _currentTokenId) {
            revert InvalidToken();
        }

        uint256 numRecipients = recipients.length;
        uint256 totalAirdropped;
        if (numRecipients != quantities.length) revert InvalidAirdrop();

        TokenSettings storage token = _tokens[id];

        for (uint256 i = 0; i < numRecipients; ) {
            uint32 updatedAmountMinted = token.amountMinted + quantities[i];
            if (token.maxSupply > 0 && updatedAmountMinted > token.maxSupply) {
                revert SoldOut();
            }

            // airdrops are not subject to the per-wallet mint limits,
            // but we track how much is minted
            token.amountMinted = updatedAmountMinted;
            totalAirdropped += quantities[i];

            _mint(recipients[i], id, quantities[i], "");

            // numRecipients has a maximum value of 2^256 - 1
            unchecked {
                ++i;
            }
        }

        emit TokensAirdropped(numRecipients, totalAirdropped);
    }

    /**
     * @notice Release funds for a particular payee
     */
    function release(address payee) public {
        uint256 amount = releasable(payee);

        if (amount > 0) {
            _totalReleased += amount;

            // If "_totalReleased += amount" does not overflow, then "_released[payee] += amount" cannot overflow.
            unchecked {
                _released[payee] += amount;
            }

            AddressUpgradeable.sendValue(payable(payee), amount);

            emit PaymentReleased(payee, amount);
        }
    }

    /**
     * @notice Release funds for specified payees
     * @dev This is a convenience method to calling release() for each payee
     */
    function releaseBatch(address[] calldata payees) external {
        uint256 numPayees = payees.length;

        for (uint256 i = 0; i < numPayees; ) {
            release(payees[i]);

            // this can't overflow as numPayees is capped at 4
            unchecked {
                ++i;
            }
        }
    }

    /**
     * @notice Update the default royalty settings (EIP-2981) for the contract.
     */
    function setRoyaltyInfo(
        address receiver,
        uint96 feeBasisPoints
    ) external onlyOwner {
        _setDefaultRoyalty(receiver, feeBasisPoints);

        emit RoyaltyUpdated(receiver, feeBasisPoints);
    }

    /**
     * @notice Update the royalty settings (EIP-2981) for the token.
     */
    function setTokenRoyaltyInfo(
        uint256 tokenId,
        address receiver,
        uint96 feeBasisPoints
    ) external onlyOwner {
        _setTokenRoyalty(tokenId, receiver, feeBasisPoints);

        emit TokenRoyaltyUpdated(tokenId, receiver, feeBasisPoints);
    }

    /**
     * @notice If enabled, the token can be burned, for approved operators.
     * @dev The burn method will revert unless this is enabled
     */
    function toggleBurning() external onlyOwner {
        allowBurning = !allowBurning;

        emit BurnStatusChanged(allowBurning);
    }

    /**
     * @dev See {ERC1155Upgradeable-_setURI}
     */
    function setUri(string calldata uri) external onlyOwner {
        _setURI(uri);
    }

    /**
     * @notice This function can only be called for tokens with supply. Calling this function will set the max supply
     * of a token to the current amount minted. This cannot be reversed.
     */
    function capSupplyAtIndex(uint256 id) external onlyOwner {
        TokenSettings storage token = _tokens[id];

        // only limited edition tokens can be capped
        if (token.maxSupply == 0) {
            revert InvalidToken();
        }

        token.maxSupply = token.amountMinted;

        emit TokenSupplyCapped(id, token.maxSupply);
    }

    /*//////////////////////////////////////////////////////////////
                           MINTING FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    /**
     * @notice Mint a token to the sender
     */
    function mintToken(uint256 id, uint32 quantity) external payable {
        TokenSettings memory token = _tokens[id];

        if (token.merkleRoot != bytes32(0)) {
            revert InvalidMintFunction();
        }

        _mintAfterChecks(
            msg.sender,
            msg.value,
            id,
            quantity,
            token.maxPerWallet
        );
    }

    /**
     * @notice Mint a token to a specific address
     * @dev Useful in case the recipient of the tokens is not the sender (gifting, fiat checkout, etc)
     */
    function mintTokenTo(
        address account,
        uint256 id,
        uint32 quantity
    ) external payable {
        TokenSettings memory token = _tokens[id];

        if (token.merkleRoot != bytes32(0)) {
            revert InvalidMintFunction();
        }

        _mintAfterChecks(account, msg.value, id, quantity, token.maxPerWallet);
    }

    /**
     * @notice Mint a token that has an allowlist associated with it.
     * @dev maxQuantity is encoded as part of the proof, and is a way to associate variable quantities with each allowlisted wallet
     */
    function mintTokenAllowlist(
        uint256 id,
        uint32 quantity,
        uint32 maxQuantity,
        bytes32[] calldata proof
    ) external payable {
        bytes32 merkleRoot = _tokens[id].merkleRoot;

        if (merkleRoot == bytes32(0)) {
            revert InvalidMintFunction();
        }

        if (
            !MerkleProof.verify(
                proof,
                merkleRoot,
                keccak256(abi.encodePacked(msg.sender, maxQuantity))
            )
        ) {
            revert InvalidProof();
        }

        _mintAfterChecks(msg.sender, msg.value, id, quantity, maxQuantity);
    }

    function _mintAfterChecks(
        address account,
        uint256 balance,
        uint256 id,
        uint32 quantity,
        uint32 maxQuantity
    ) private {
        if (id >= _currentTokenId) {
            revert InvalidToken();
        }

        TokenSettings storage token = _tokens[id];

        if (balance != token.price * quantity) {
            revert InvalidPrice();
        }

        if (
            token.maxSupply > 0 &&
            token.amountMinted + quantity > token.maxSupply
        ) {
            revert SoldOut();
        }

        if (
            maxQuantity > 0 &&
            // maxQuantity is either the token-level maxPerWallet, or the maxQuantity passed in from the allowlist mint function
            // if the latter, the value is provided by the user, but is first checked against the merkle tree
            _mintBalanceByTokenId[id][account] + quantity > maxQuantity
        ) {
            revert ExceedMaxPerWallet();
        }

        if (token.mintStart > 0 && block.timestamp < token.mintStart) {
            revert MintNotActive();
        }

        if (token.mintEnd > 0 && block.timestamp > token.mintEnd) {
            revert MintNotActive();
        }

        // we only need to proceed if this is a revenue generating mint
        if (balance > 0) {
            uint256 numPayees = token.paymentSplitterSettings.payees.length;

            if (numPayees > 0) {
                // if we have token-level payment splitter settings, use those
                calculateRevenueSplit(balance, token.paymentSplitterSettings);
            } else {
                // otherwise, fallback to the contract-level payment splitter settings
                calculateRevenueSplit(
                    balance,
                    _fallbackPaymentSplitterSettings
                );
            }
        }

        token.amountMinted += quantity;
        _mintBalanceByTokenId[id][account] += quantity;

        _mint(account, id, quantity, "");

        emit TokensMinted(account, id, quantity);
    }

    function calculateRevenueSplit(
        uint256 value,
        PaymentSplitterSettings storage paymentSplitterSettings
    ) private {
        uint256 numPayees = paymentSplitterSettings.payees.length;

        // each token can have different payment splitter settings, and price can change while mint is occurring
        // therefore we need to do some revenue accounting at the time of mint based on the price paid
        for (uint256 i = 0; i < numPayees; ) {
            address payee = paymentSplitterSettings.payees[i];
            uint256 amount = ((value * paymentSplitterSettings.shares[i]) /
                100);

            _revenueByAddress[payee] += amount;

            // this can't overflow as numPayees is capped at 4
            unchecked {
                ++i;
            }
        }
    }

    /**
     * @notice Burn a token, if the contract allows for it
     */
    function burn(uint256 id, uint256 amount) external {
        if (!allowBurning) {
            revert BurningNotAllowed();
        }

        _burn(msg.sender, id, amount);

        emit TokenBurned(msg.sender, id, amount);
    }

    /*//////////////////////////////////////////////////////////////
                             VIEW FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    /**
     * @notice Get the token data based on it's ID (1, 2, etc)
     */
    function getTokenSettingsByTokenId(
        uint256 id
    ) external view returns (TokenSettings memory) {
        return _tokens[id];
    }

    /**
     * @notice Retrieve the fallback payment splitter config (used if a token doesn't have it's own payment splitter settings)
     */
    function getFallbackPaymentSplitterSettings()
        external
        view
        returns (PaymentSplitterSettings memory)
    {
        return _fallbackPaymentSplitterSettings;
    }

    /**
     * @notice Get the token data for all tokens associated with the contract
     */
    function getAllTokenData() external view returns (TokenData[] memory) {
        uint256 numTokens = _currentTokenId;
        TokenData[] memory tokens = new TokenData[](numTokens);

        for (uint256 i = 0; i < numTokens; i++) {
            tokens[i].settings = _tokens[i];
            tokens[i].index = i;
        }

        return tokens;
    }

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

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

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

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(
        bytes4 interfaceId
    )
        public
        view
        virtual
        override(ERC1155Upgradeable, ERC2981Upgradeable)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    /*//////////////////////////////////////////////////////////////
                      OPERATOR REGISTRY OVERRIDES
    //////////////////////////////////////////////////////////////*/

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        uint256 amount,
        bytes memory data
    ) public override onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, tokenId, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override onlyAllowedOperator(from) {
        super.safeBatchTransferFrom(from, to, ids, amounts, data);
    }
}

File 2 of 28 : PufflesERC1155Deployer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/proxy/Clones.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./PufflesERC1155.sol";

contract PufflesERC1155Deployer is AccessControl {
    address private DEFAULT_OPERATOR_FILTER =
        address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

    address private drop721Implementation;
    address private drop1155Implementation;

    event ContractCreated(address creator, address contractAddress);

    constructor() {
        _grantRole(DEFAULT_ADMIN_ROLE, _msgSender());
    }

    function updateDefaultOperatorFilter(
        address newFilter
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        DEFAULT_OPERATOR_FILTER = newFilter;
    }

    function update1155Implementation(
        address newImplementation
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        drop1155Implementation = newImplementation;
    }

    function getOperatorFilter() external view returns (address) {
        return DEFAULT_OPERATOR_FILTER;
    }

    function deploy1155Drop(
        string memory _name,
        string memory _symbol,
        string memory _baseUri,
        TokenSettings[] calldata _tokenSettings,
        RoyaltySettings calldata _royaltySettings,
        PaymentSplitterSettings calldata _paymentSplitterSettings,
        bool _registerOperatorFilter,
        bool _allowBurning
    ) external {
        require(drop1155Implementation != address(0), "Implementation not set");

        address clone = Clones.clone(drop1155Implementation);

        address operatorFilter = _registerOperatorFilter
            ? DEFAULT_OPERATOR_FILTER
            : address(0);

        PufflesERC1155(clone).initialize(
            _name,
            _symbol,
            _baseUri,
            _tokenSettings,
            _royaltySettings,
            _paymentSplitterSettings,
            _allowBurning,
            msg.sender,
            operatorFilter
        );

        emit ContractCreated(msg.sender, clone);
    }
}

File 3 of 28 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address account => bool) hasRole;
        bytes32 adminRole;
    }

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual returns (bool) {
        return _roles[role].hasRole[account];
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address callerConfirmation) public virtual {
        if (callerConfirmation != _msgSender()) {
            revert AccessControlBadConfirmation();
        }

        _revokeRole(role, callerConfirmation);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        if (!hasRole(role, account)) {
            _roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        if (hasRole(role, account)) {
            _roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

File 4 of 28 : Clones.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Clones.sol)

pragma solidity ^0.8.20;

/**
 * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
 * deploying minimal proxy contracts, also known as "clones".
 *
 * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
 * > a minimal bytecode implementation that delegates all calls to a known, fixed address.
 *
 * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
 * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
 * deterministic method.
 */
library Clones {
    /**
     * @dev A clone instance deployment failed.
     */
    error ERC1167FailedCreateClone();

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create opcode, which should never revert.
     */
    function clone(address implementation) internal returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create(0, 0x09, 0x37)
        }
        if (instance == address(0)) {
            revert ERC1167FailedCreateClone();
        }
    }

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create2 opcode and a `salt` to deterministically deploy
     * the clone. Using the same `implementation` and `salt` multiple time will revert, since
     * the clones cannot be deployed twice at the same address.
     */
    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create2(0, 0x09, 0x37, salt)
        }
        if (instance == address(0)) {
            revert ERC1167FailedCreateClone();
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt,
        address deployer
    ) internal pure returns (address predicted) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(add(ptr, 0x38), deployer)
            mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)
            mstore(add(ptr, 0x14), implementation)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)
            mstore(add(ptr, 0x58), salt)
            mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))
            predicted := keccak256(add(ptr, 0x43), 0x55)
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt
    ) internal view returns (address predicted) {
        return predictDeterministicAddress(implementation, salt, address(this));
    }
}

File 5 of 28 : ICommon.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

error InvalidPrice();
error SoldOut();
error ExceedMaxPerWallet();
error InvalidProof();
error InvalidMintFunction();
error InvalidAirdrop();
error BurningNotAllowed();

struct PaymentSplitterSettings {
    address[] payees;
    uint256[] shares;
}

struct RoyaltySettings {
    address royaltyAddress;
    uint96 royaltyAmount;
}

File 6 of 28 : OperatorFiltererUpgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {IOperatorFilterRegistry} from "../IOperatorFilterRegistry.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
 * @title  OperatorFiltererUpgradeable
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry when the init function is called.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 */
abstract contract OperatorFiltererUpgradeable is Initializable {
    /// @notice Emitted when an operator is not allowed.
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

    /// @dev The upgradeable initialize function that should be called when the contract is being upgraded.
    function __OperatorFilterer_init(address subscriptionOrRegistrantToCopy, bool subscribe)
        internal
        onlyInitializing
    {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (!OPERATOR_FILTER_REGISTRY.isRegistered(address(this))) {
                if (subscribe) {
                    OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    if (subscriptionOrRegistrantToCopy != address(0)) {
                        OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                    } else {
                        OPERATOR_FILTER_REGISTRY.register(address(this));
                    }
                }
            }
        }
    }

    /**
     * @dev A helper modifier to check if the operator is allowed.
     */
    modifier onlyAllowedOperator(address from) virtual {
        // Allow spending tokens from addresses with balance
        // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
        // from an EOA.
        if (from != msg.sender) {
            _checkFilterOperator(msg.sender);
        }
        _;
    }

    /**
     * @dev A helper modifier to check if the operator approval is allowed.
     */
    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    /**
     * @dev A helper function to check if the operator is allowed.
     */
    function _checkFilterOperator(address operator) internal view virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            // under normal circumstances, this function will revert rather than return false, but inheriting or
            // upgraded contracts may specify their own OperatorFilterRegistry implementations, which may behave
            // differently
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

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

pragma solidity ^0.8.20;

import {IERC2981} from "@openzeppelin/contracts/interfaces/IERC2981.sol";
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import {ERC165Upgradeable} from "../../utils/introspection/ERC165Upgradeable.sol";
import {Initializable} from "../../proxy/utils/Initializable.sol";

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

    /// @custom:storage-location erc7201:openzeppelin.storage.ERC2981
    struct ERC2981Storage {
        RoyaltyInfo _defaultRoyaltyInfo;
        mapping(uint256 tokenId => RoyaltyInfo) _tokenRoyaltyInfo;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC2981")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant ERC2981StorageLocation = 0xdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b00;

    function _getERC2981Storage() private pure returns (ERC2981Storage storage $) {
        assembly {
            $.slot := ERC2981StorageLocation
        }
    }

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

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

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

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

    function __ERC2981_init() internal onlyInitializing {
    }

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

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual returns (address, uint256) {
        ERC2981Storage storage $ = _getERC2981Storage();
        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 {
        ERC2981Storage storage $ = _getERC2981Storage();
        uint256 denominator = _feeDenominator();
        if (feeNumerator > denominator) {
            // Royalty fee will exceed the sale price
            revert ERC2981InvalidDefaultRoyalty(feeNumerator, denominator);
        }
        if (receiver == address(0)) {
            revert ERC2981InvalidDefaultRoyaltyReceiver(address(0));
        }

        $._defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        ERC2981Storage storage $ = _getERC2981Storage();
        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 {
        ERC2981Storage storage $ = _getERC2981Storage();
        uint256 denominator = _feeDenominator();
        if (feeNumerator > denominator) {
            // Royalty fee will exceed the sale price
            revert ERC2981InvalidTokenRoyalty(tokenId, feeNumerator, denominator);
        }
        if (receiver == address(0)) {
            revert ERC2981InvalidTokenRoyaltyReceiver(tokenId, address(0));
        }

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    /// @custom:storage-location erc7201:openzeppelin.storage.Ownable
    struct OwnableStorage {
        address _owner;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;

    function _getOwnableStorage() private pure returns (OwnableStorage storage $) {
        assembly {
            $.slot := OwnableStorageLocation
        }
    }

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

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

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    function __Ownable_init(address initialOwner) internal onlyInitializing {
        __Ownable_init_unchained(initialOwner);
    }

    function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

File 11 of 28 : ERC1155SupplyUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/ERC1155Supply.sol)

pragma solidity ^0.8.20;

import {ERC1155Upgradeable} from "../ERC1155Upgradeable.sol";
import {Initializable} from "../../../proxy/utils/Initializable.sol";

/**
 * @dev Extension of ERC1155 that adds tracking of total supply per id.
 *
 * Useful for scenarios where Fungible and Non-fungible tokens have to be
 * clearly identified. Note: While a totalSupply of 1 might mean the
 * corresponding is an NFT, there is no guarantees that no other token with the
 * same id are not going to be minted.
 *
 * NOTE: This contract implies a global limit of 2**256 - 1 to the number of tokens
 * that can be minted.
 *
 * CAUTION: This extension should not be added in an upgrade to an already deployed contract.
 */
abstract contract ERC1155SupplyUpgradeable is Initializable, ERC1155Upgradeable {
    /// @custom:storage-location erc7201:openzeppelin.storage.ERC1155Supply
    struct ERC1155SupplyStorage {
        mapping(uint256 id => uint256) _totalSupply;
        uint256 _totalSupplyAll;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC1155Supply")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant ERC1155SupplyStorageLocation = 0x4a593662ee04d27b6a00ebb31be7fe0c102c2ade82a7c5d764f2df05dc4e2800;

    function _getERC1155SupplyStorage() private pure returns (ERC1155SupplyStorage storage $) {
        assembly {
            $.slot := ERC1155SupplyStorageLocation
        }
    }

    function __ERC1155Supply_init() internal onlyInitializing {
    }

    function __ERC1155Supply_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev Total value of tokens in with a given id.
     */
    function totalSupply(uint256 id) public view virtual returns (uint256) {
        ERC1155SupplyStorage storage $ = _getERC1155SupplyStorage();
        return $._totalSupply[id];
    }

    /**
     * @dev Total value of tokens.
     */
    function totalSupply() public view virtual returns (uint256) {
        ERC1155SupplyStorage storage $ = _getERC1155SupplyStorage();
        return $._totalSupplyAll;
    }

    /**
     * @dev Indicates whether any token exist with a given id, or not.
     */
    function exists(uint256 id) public view virtual returns (bool) {
        return totalSupply(id) > 0;
    }

    /**
     * @dev See {ERC1155-_update}.
     */
    function _update(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory values
    ) internal virtual override {
        ERC1155SupplyStorage storage $ = _getERC1155SupplyStorage();
        super._update(from, to, ids, values);

        if (from == address(0)) {
            uint256 totalMintValue = 0;
            for (uint256 i = 0; i < ids.length; ++i) {
                uint256 value = values[i];
                // Overflow check required: The rest of the code assumes that totalSupply never overflows
                $._totalSupply[ids[i]] += value;
                totalMintValue += value;
            }
            // Overflow check required: The rest of the code assumes that totalSupplyAll never overflows
            $._totalSupplyAll += totalMintValue;
        }

        if (to == address(0)) {
            uint256 totalBurnValue = 0;
            for (uint256 i = 0; i < ids.length; ++i) {
                uint256 value = values[i];

                unchecked {
                    // Overflow not possible: values[i] <= balanceOf(from, ids[i]) <= totalSupply(ids[i])
                    $._totalSupply[ids[i]] -= value;
                    // Overflow not possible: sum_i(values[i]) <= sum_i(totalSupply(ids[i])) <= totalSupplyAll
                    totalBurnValue += value;
                }
            }
            unchecked {
                // Overflow not possible: totalBurnValue = sum_i(values[i]) <= sum_i(totalSupply(ids[i])) <= totalSupplyAll
                $._totalSupplyAll -= totalBurnValue;
            }
        }
    }
}

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

pragma solidity ^0.8.20;

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

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

File 13 of 28 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

File 14 of 28 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

File 15 of 28 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Storage of the initializable contract.
     *
     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
     * when using with upgradeable contracts.
     *
     * @custom:storage-location erc7201:openzeppelin.storage.Initializable
     */
    struct InitializableStorage {
        /**
         * @dev Indicates that the contract has been initialized.
         */
        uint64 _initialized;
        /**
         * @dev Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;

    /**
     * @dev The contract is already initialized.
     */
    error InvalidInitialization();

    /**
     * @dev The contract is not initializing.
     */
    error NotInitializing();

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint64 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
     * production.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        // Cache values to avoid duplicated sloads
        bool isTopLevelCall = !$._initializing;
        uint64 initialized = $._initialized;

        // Allowed calls:
        // - initialSetup: the contract is not in the initializing state and no previous version was
        //                 initialized
        // - construction: the contract is initialized at version 1 (no reininitialization) and the
        //                 current contract is just being deployed
        bool initialSetup = initialized == 0 && isTopLevelCall;
        bool construction = initialized == 1 && address(this).code.length == 0;

        if (!initialSetup && !construction) {
            revert InvalidInitialization();
        }
        $._initialized = 1;
        if (isTopLevelCall) {
            $._initializing = true;
        }
        _;
        if (isTopLevelCall) {
            $._initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint64 version) {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing || $._initialized >= version) {
            revert InvalidInitialization();
        }
        $._initialized = version;
        $._initializing = true;
        _;
        $._initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        _checkInitializing();
        _;
    }

    /**
     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
     */
    function _checkInitializing() internal view virtual {
        if (!_isInitializing()) {
            revert NotInitializing();
        }
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing) {
            revert InvalidInitialization();
        }
        if ($._initialized != type(uint64).max) {
            $._initialized = type(uint64).max;
            emit Initialized(type(uint64).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint64) {
        return _getInitializableStorage()._initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _getInitializableStorage()._initializing;
    }

    /**
     * @dev Returns a pointer to the storage namespace.
     */
    // solhint-disable-next-line var-name-mixedcase
    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
        assembly {
            $.slot := INITIALIZABLE_STORAGE
        }
    }
}

File 16 of 28 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    /**
     * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns
     *         true if supplied registrant address is not registered.
     */
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);

    /**
     * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.
     */
    function register(address registrant) external;

    /**
     * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes.
     */
    function registerAndSubscribe(address registrant, address subscription) external;

    /**
     * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another
     *         address without subscribing.
     */
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;

    /**
     * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner.
     *         Note that this does not remove any filtered addresses or codeHashes.
     *         Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes.
     */
    function unregister(address addr) external;

    /**
     * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered.
     */
    function updateOperator(address registrant, address operator, bool filtered) external;

    /**
     * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates.
     */
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;

    /**
     * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered.
     */
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;

    /**
     * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates.
     */
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;

    /**
     * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous
     *         subscription if present.
     *         Note that accounts with subscriptions may go on to subscribe to other accounts - in this case,
     *         subscriptions will not be forwarded. Instead the former subscription's existing entries will still be
     *         used.
     */
    function subscribe(address registrant, address registrantToSubscribe) external;

    /**
     * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes.
     */
    function unsubscribe(address registrant, bool copyExistingEntries) external;

    /**
     * @notice Get the subscription address of a given registrant, if any.
     */
    function subscriptionOf(address addr) external returns (address registrant);

    /**
     * @notice Get the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscribers(address registrant) external returns (address[] memory);

    /**
     * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscriberAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr.
     */
    function copyEntriesOf(address registrant, address registrantToCopy) external;

    /**
     * @notice Returns true if operator is filtered by a given address or its subscription.
     */
    function isOperatorFiltered(address registrant, address operator) external returns (bool);

    /**
     * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription.
     */
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);

    /**
     * @notice Returns true if a codeHash is filtered by a given address or its subscription.
     */
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);

    /**
     * @notice Returns a list of filtered operators for a given address or its subscription.
     */
    function filteredOperators(address addr) external returns (address[] memory);

    /**
     * @notice Returns the set of filtered codeHashes for a given address or its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);

    /**
     * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);

    /**
     * @notice Returns true if an address has registered
     */
    function isRegistered(address addr) external returns (bool);

    /**
     * @dev Convenience method to compute the code hash of an arbitrary contract
     */
    function codeHashOf(address addr) external returns (bytes32);
}

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

pragma solidity ^0.8.20;

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

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

pragma solidity ^0.8.20;

import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import {Initializable} from "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165Upgradeable is Initializable, IERC165 {
    function __ERC165_init() internal onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

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

pragma solidity ^0.8.20;

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

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

File 20 of 28 : ERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.20;

import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import {IERC1155Receiver} from "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import {IERC1155MetadataURI} from "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol";
import {ContextUpgradeable} from "../../utils/ContextUpgradeable.sol";
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import {ERC165Upgradeable} from "../../utils/introspection/ERC165Upgradeable.sol";
import {Arrays} from "@openzeppelin/contracts/utils/Arrays.sol";
import {IERC1155Errors} from "@openzeppelin/contracts/interfaces/draft-IERC6093.sol";
import {Initializable} from "../../proxy/utils/Initializable.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
 */
abstract contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155, IERC1155MetadataURI, IERC1155Errors {
    using Arrays for uint256[];
    using Arrays for address[];

    /// @custom:storage-location erc7201:openzeppelin.storage.ERC1155
    struct ERC1155Storage {
        mapping(uint256 id => mapping(address account => uint256)) _balances;

        mapping(address account => mapping(address operator => bool)) _operatorApprovals;

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

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC1155")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant ERC1155StorageLocation = 0x88be536d5240c274a3b1d3a1be54482fd9caa294f08c62a7cde569f49a3c4500;

    function _getERC1155Storage() private pure returns (ERC1155Storage storage $) {
        assembly {
            $.slot := ERC1155StorageLocation
        }
    }

    /**
     * @dev See {_setURI}.
     */
    function __ERC1155_init(string memory uri_) internal onlyInitializing {
        __ERC1155_init_unchained(uri_);
    }

    function __ERC1155_init_unchained(string memory uri_) internal onlyInitializing {
        _setURI(uri_);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, 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 /* id */) public view virtual returns (string memory) {
        ERC1155Storage storage $ = _getERC1155Storage();
        return $._uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     */
    function balanceOf(address account, uint256 id) public view virtual returns (uint256) {
        ERC1155Storage storage $ = _getERC1155Storage();
        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 returns (uint256[] memory) {
        if (accounts.length != ids.length) {
            revert ERC1155InvalidArrayLength(ids.length, accounts.length);
        }

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

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

        return batchBalances;
    }

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) public virtual {
        address sender = _msgSender();
        if (from != sender && !isApprovedForAll(from, sender)) {
            revert ERC1155MissingApprovalForAll(sender, from);
        }
        _safeTransferFrom(from, to, id, value, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory values,
        bytes memory data
    ) public virtual {
        address sender = _msgSender();
        if (from != sender && !isApprovedForAll(from, sender)) {
            revert ERC1155MissingApprovalForAll(sender, from);
        }
        _safeBatchTransferFrom(from, to, ids, values, data);
    }

    /**
     * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. Will mint (or burn) if `from`
     * (or `to`) is the zero address.
     *
     * Emits a {TransferSingle} event if the arrays contain one element, and {TransferBatch} otherwise.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement either {IERC1155Receiver-onERC1155Received}
     *   or {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value.
     * - `ids` and `values` must have the same length.
     *
     * NOTE: The ERC-1155 acceptance check is not performed in this function. See {_updateWithAcceptanceCheck} instead.
     */
    function _update(address from, address to, uint256[] memory ids, uint256[] memory values) internal virtual {
        ERC1155Storage storage $ = _getERC1155Storage();
        if (ids.length != values.length) {
            revert ERC1155InvalidArrayLength(ids.length, values.length);
        }

        address operator = _msgSender();

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids.unsafeMemoryAccess(i);
            uint256 value = values.unsafeMemoryAccess(i);

            if (from != address(0)) {
                uint256 fromBalance = $._balances[id][from];
                if (fromBalance < value) {
                    revert ERC1155InsufficientBalance(from, fromBalance, value, id);
                }
                unchecked {
                    // Overflow not possible: value <= fromBalance
                    $._balances[id][from] = fromBalance - value;
                }
            }

            if (to != address(0)) {
                $._balances[id][to] += value;
            }
        }

        if (ids.length == 1) {
            uint256 id = ids.unsafeMemoryAccess(0);
            uint256 value = values.unsafeMemoryAccess(0);
            emit TransferSingle(operator, from, to, id, value);
        } else {
            emit TransferBatch(operator, from, to, ids, values);
        }
    }

    /**
     * @dev Version of {_update} that performs the token acceptance check by calling
     * {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it
     * contains code (eg. is a smart contract at the moment of execution).
     *
     * IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any
     * update to the contract state after this function would break the check-effect-interaction pattern. Consider
     * overriding {_update} instead.
     */
    function _updateWithAcceptanceCheck(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory values,
        bytes memory data
    ) internal virtual {
        _update(from, to, ids, values);
        if (to != address(0)) {
            address operator = _msgSender();
            if (ids.length == 1) {
                uint256 id = ids.unsafeMemoryAccess(0);
                uint256 value = values.unsafeMemoryAccess(0);
                _doSafeTransferAcceptanceCheck(operator, from, to, id, value, data);
            } else {
                _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, values, data);
            }
        }
    }

    /**
     * @dev Transfers a `value` 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 `value` 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 value, bytes memory data) internal {
        if (to == address(0)) {
            revert ERC1155InvalidReceiver(address(0));
        }
        if (from == address(0)) {
            revert ERC1155InvalidSender(address(0));
        }
        (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
        _updateWithAcceptanceCheck(from, to, ids, values, 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.
     * - `ids` and `values` must have the same length.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory values,
        bytes memory data
    ) internal {
        if (to == address(0)) {
            revert ERC1155InvalidReceiver(address(0));
        }
        if (from == address(0)) {
            revert ERC1155InvalidSender(address(0));
        }
        _updateWithAcceptanceCheck(from, to, ids, values, 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 values 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 {
        ERC1155Storage storage $ = _getERC1155Storage();
        $._uri = newuri;
    }

    /**
     * @dev Creates a `value` amount of tokens of 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 value, bytes memory data) internal {
        if (to == address(0)) {
            revert ERC1155InvalidReceiver(address(0));
        }
        (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
        _updateWithAcceptanceCheck(address(0), to, ids, values, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `values` must have the same length.
     * - `to` cannot be the zero address.
     * - 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 values, bytes memory data) internal {
        if (to == address(0)) {
            revert ERC1155InvalidReceiver(address(0));
        }
        _updateWithAcceptanceCheck(address(0), to, ids, values, data);
    }

    /**
     * @dev Destroys a `value` amount of tokens of type `id` from `from`
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `value` amount of tokens of type `id`.
     */
    function _burn(address from, uint256 id, uint256 value) internal {
        if (from == address(0)) {
            revert ERC1155InvalidSender(address(0));
        }
        (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
        _updateWithAcceptanceCheck(from, address(0), ids, values, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `value` amount of tokens of type `id`.
     * - `ids` and `values` must have the same length.
     */
    function _burnBatch(address from, uint256[] memory ids, uint256[] memory values) internal {
        if (from == address(0)) {
            revert ERC1155InvalidSender(address(0));
        }
        _updateWithAcceptanceCheck(from, address(0), ids, values, "");
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the zero address.
     */
    function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
        ERC1155Storage storage $ = _getERC1155Storage();
        if (operator == address(0)) {
            revert ERC1155InvalidOperator(address(0));
        }
        $._operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Performs an acceptance check by calling {IERC1155-onERC1155Received} on the `to` address
     * if it contains code at the moment of execution.
     */
    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 value,
        bytes memory data
    ) private {
        if (to.code.length > 0) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, value, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    // Tokens rejected
                    revert ERC1155InvalidReceiver(to);
                }
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    // non-ERC1155Receiver implementer
                    revert ERC1155InvalidReceiver(to);
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        }
    }

    /**
     * @dev Performs a batch acceptance check by calling {IERC1155-onERC1155BatchReceived} on the `to` address
     * if it contains code at the moment of execution.
     */
    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory values,
        bytes memory data
    ) private {
        if (to.code.length > 0) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, values, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    // Tokens rejected
                    revert ERC1155InvalidReceiver(to);
                }
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    // non-ERC1155Receiver implementer
                    revert ERC1155InvalidReceiver(to);
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        }
    }

    /**
     * @dev Creates an array in memory with only one value for each of the elements provided.
     */
    function _asSingletonArrays(
        uint256 element1,
        uint256 element2
    ) private pure returns (uint256[] memory array1, uint256[] memory array2) {
        /// @solidity memory-safe-assembly
        assembly {
            // Load the free memory pointer
            array1 := mload(0x40)
            // Set array length to 1
            mstore(array1, 1)
            // Store the single element at the next word after the length (where content starts)
            mstore(add(array1, 0x20), element1)

            // Repeat for next array locating it right after the first array
            array2 := add(array1, 0x40)
            mstore(array2, 1)
            mstore(add(array2, 0x20), element2)

            // Update the free memory pointer by pointing after the second array
            mstore(0x40, add(array2, 0x40))
        }
    }
}

File 21 of 28 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)

pragma solidity ^0.8.0;
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

File 22 of 28 : draft-IERC6093.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

File 23 of 28 : Arrays.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Arrays.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Collection of functions related to array types.
 */
library Arrays {
    using StorageSlot for bytes32;

    /**
     * @dev Searches a sorted `array` and returns the first index that contains
     * a value greater or equal to `element`. If no such index exists (i.e. all
     * values in the array are strictly less than `element`), the array length is
     * returned. Time complexity O(log n).
     *
     * `array` is expected to be sorted in ascending order, and to contain no
     * repeated elements.
     */
    function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {
        uint256 low = 0;
        uint256 high = array.length;

        if (high == 0) {
            return 0;
        }

        while (low < high) {
            uint256 mid = Math.average(low, high);

            // Note that mid will always be strictly less than high (i.e. it will be a valid array index)
            // because Math.average rounds towards zero (it does integer division with truncation).
            if (unsafeAccess(array, mid).value > element) {
                high = mid;
            } else {
                low = mid + 1;
            }
        }

        // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.
        if (low > 0 && unsafeAccess(array, low - 1).value == element) {
            return low - 1;
        } else {
            return low;
        }
    }

    /**
     * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
     *
     * WARNING: Only use if you are certain `pos` is lower than the array length.
     */
    function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) {
        bytes32 slot;
        // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
        // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.

        /// @solidity memory-safe-assembly
        assembly {
            mstore(0, arr.slot)
            slot := add(keccak256(0, 0x20), pos)
        }
        return slot.getAddressSlot();
    }

    /**
     * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
     *
     * WARNING: Only use if you are certain `pos` is lower than the array length.
     */
    function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) {
        bytes32 slot;
        // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
        // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.

        /// @solidity memory-safe-assembly
        assembly {
            mstore(0, arr.slot)
            slot := add(keccak256(0, 0x20), pos)
        }
        return slot.getBytes32Slot();
    }

    /**
     * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
     *
     * WARNING: Only use if you are certain `pos` is lower than the array length.
     */
    function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) {
        bytes32 slot;
        // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
        // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.

        /// @solidity memory-safe-assembly
        assembly {
            mstore(0, arr.slot)
            slot := add(keccak256(0, 0x20), pos)
        }
        return slot.getUint256Slot();
    }

    /**
     * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
     *
     * WARNING: Only use if you are certain `pos` is lower than the array length.
     */
    function unsafeMemoryAccess(uint256[] memory arr, uint256 pos) internal pure returns (uint256 res) {
        assembly {
            res := mload(add(add(arr, 0x20), mul(pos, 0x20)))
        }
    }

    /**
     * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
     *
     * WARNING: Only use if you are certain `pos` is lower than the array length.
     */
    function unsafeMemoryAccess(address[] memory arr, uint256 pos) internal pure returns (address res) {
        assembly {
            res := mload(add(add(arr, 0x20), mul(pos, 0x20)))
        }
    }
}

File 24 of 28 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.20;

import {IERC1155} from "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 */
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);
}

File 25 of 28 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Interface that must be implemented by smart contracts in order to receive
 * ERC-1155 token transfers.
 */
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);
}

File 26 of 28 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` amount of tokens of 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 value 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 a `value` amount of tokens of type `id` from `from` to `to`.
     *
     * WARNING: This function can potentially allow a reentrancy attack when transferring tokens
     * to an untrusted contract, when invoking {onERC1155Received} on the receiver.
     * Ensure to follow the checks-effects-interactions pattern and consider employing
     * reentrancy guards when interacting with untrusted contracts.
     *
     * 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 `value` 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 value, bytes calldata data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * WARNING: This function can potentially allow a reentrancy attack when transferring tokens
     * to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver.
     * Ensure to follow the checks-effects-interactions pattern and consider employing
     * reentrancy guards when interacting with untrusted contracts.
     *
     * Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments.
     *
     * Requirements:
     *
     * - `ids` and `values` 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 values,
        bytes calldata data
    ) external;
}

File 27 of 28 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

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

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

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

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

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

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

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

            uint256 twos = denominator & (0 - denominator);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 28 of 28 : StorageSlot.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.

pragma solidity ^0.8.20;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```solidity
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(newImplementation.code.length > 0);
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` with member `value` located at `slot`.
     */
    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.
     */
    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` with member `value` located at `slot`.
     */
    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
     */
    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BurningNotAllowed","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC1155InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC1155InvalidApprover","type":"error"},{"inputs":[{"internalType":"uint256","name":"idsLength","type":"uint256"},{"internalType":"uint256","name":"valuesLength","type":"uint256"}],"name":"ERC1155InvalidArrayLength","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC1155InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC1155InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC1155InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC1155MissingApprovalForAll","type":"error"},{"inputs":[{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidDefaultRoyalty","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidDefaultRoyaltyReceiver","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidTokenRoyalty","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidTokenRoyaltyReceiver","type":"error"},{"inputs":[],"name":"ExceedMaxPerWallet","type":"error"},{"inputs":[],"name":"InvalidAirdrop","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidMintDates","type":"error"},{"inputs":[],"name":"InvalidMintFunction","type":"error"},{"inputs":[],"name":"InvalidPaymentSplitterSettings","type":"error"},{"inputs":[],"name":"InvalidPrice","type":"error"},{"inputs":[],"name":"InvalidProof","type":"error"},{"inputs":[],"name":"InvalidToken","type":"error"},{"inputs":[],"name":"MintNotActive","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"SoldOut","type":"error"},{"inputs":[],"name":"TokenSettingsLocked","type":"error"},{"inputs":[],"name":"TooManyTokens","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":"burnActive","type":"bool"}],"name":"BurnStatusChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"FallbackRevenueSettingsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"RevenueSettingsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"royaltyAddress","type":"address"},{"indexed":false,"internalType":"uint96","name":"royaltyAmount","type":"uint96"}],"name":"RoyaltyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"uuid","type":"string"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"royaltyAddress","type":"address"},{"indexed":false,"internalType":"uint96","name":"royaltyAmount","type":"uint96"}],"name":"TokenRoyaltyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenSettingsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxSupply","type":"uint256"}],"name":"TokenSupplyCapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"numRecipients","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numTokens","type":"uint256"}],"name":"TokensAirdropped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"TokensMinted","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":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint32[]","name":"quantities","type":"uint32[]"},{"internalType":"address[]","name":"recipients","type":"address[]"}],"name":"airdropToken","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"capSupplyAtIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint32","name":"maxPerWallet","type":"uint32"},{"internalType":"uint32","name":"amountMinted","type":"uint32"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint32","name":"mintStart","type":"uint32"},{"internalType":"uint32","name":"mintEnd","type":"uint32"},{"internalType":"uint256","name":"price","type":"uint256"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"paymentSplitterSettings","type":"tuple"}],"internalType":"struct TokenSettings","name":"settings","type":"tuple"}],"name":"createDropToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint32","name":"maxPerWallet","type":"uint32"},{"internalType":"uint32","name":"amountMinted","type":"uint32"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint32","name":"mintStart","type":"uint32"},{"internalType":"uint32","name":"mintEnd","type":"uint32"},{"internalType":"uint256","name":"price","type":"uint256"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"paymentSplitterSettings","type":"tuple"}],"internalType":"struct TokenSettings[]","name":"tokenSettings","type":"tuple[]"}],"name":"createDropTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllTokenData","outputs":[{"components":[{"components":[{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint32","name":"maxPerWallet","type":"uint32"},{"internalType":"uint32","name":"amountMinted","type":"uint32"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint32","name":"mintStart","type":"uint32"},{"internalType":"uint32","name":"mintEnd","type":"uint32"},{"internalType":"uint256","name":"price","type":"uint256"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"paymentSplitterSettings","type":"tuple"}],"internalType":"struct TokenSettings","name":"settings","type":"tuple"},{"internalType":"uint256","name":"index","type":"uint256"}],"internalType":"struct TokenData[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFallbackPaymentSplitterSettings","outputs":[{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getTokenSettingsByTokenId","outputs":[{"components":[{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint32","name":"maxPerWallet","type":"uint32"},{"internalType":"uint32","name":"amountMinted","type":"uint32"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint32","name":"mintStart","type":"uint32"},{"internalType":"uint32","name":"mintEnd","type":"uint32"},{"internalType":"uint256","name":"price","type":"uint256"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"paymentSplitterSettings","type":"tuple"}],"internalType":"struct TokenSettings","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_baseUri","type":"string"},{"components":[{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint32","name":"maxPerWallet","type":"uint32"},{"internalType":"uint32","name":"amountMinted","type":"uint32"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint32","name":"mintStart","type":"uint32"},{"internalType":"uint32","name":"mintEnd","type":"uint32"},{"internalType":"uint256","name":"price","type":"uint256"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"paymentSplitterSettings","type":"tuple"}],"internalType":"struct TokenSettings[]","name":"_tokenSettings","type":"tuple[]"},{"components":[{"internalType":"address","name":"royaltyAddress","type":"address"},{"internalType":"uint96","name":"royaltyAmount","type":"uint96"}],"internalType":"struct RoyaltySettings","name":"_royaltySettings","type":"tuple"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"_paymentSplitterSettings","type":"tuple"},{"internalType":"bool","name":"_allowBurning","type":"bool"},{"internalType":"address","name":"_deployer","type":"address"},{"internalType":"address","name":"_operatorFilter","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint32","name":"quantity","type":"uint32"}],"name":"mintToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint32","name":"quantity","type":"uint32"},{"internalType":"uint32","name":"maxQuantity","type":"uint32"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintTokenAllowlist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint32","name":"quantity","type":"uint32"}],"name":"mintTokenTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"payee","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"payees","type":"address[]"}],"name":"releaseBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"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":"tokenId","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":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeBasisPoints","type":"uint96"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeBasisPoints","type":"uint96"}],"name":"setTokenRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","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":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleBurning","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"settings","type":"tuple"}],"name":"updateFallbackPaymentSplitterSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"settings","type":"tuple"}],"name":"updatePaymentSplitterSettingsByIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"uint32","name":"maxSupply","type":"uint32"},{"internalType":"uint32","name":"maxPerWallet","type":"uint32"},{"internalType":"uint32","name":"amountMinted","type":"uint32"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint32","name":"mintStart","type":"uint32"},{"internalType":"uint32","name":"mintEnd","type":"uint32"},{"internalType":"uint256","name":"price","type":"uint256"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"paymentSplitterSettings","type":"tuple"}],"internalType":"struct TokenSettings","name":"settings","type":"tuple"}],"name":"updateTokenSettingsByIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

6080604052348015600e575f80fd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b614c8a806100d65f395ff3fe60806040526004361061023d575f3560e01c806371b38f0711610134578063aeb61fea116100b3578063df745d2811610078578063df745d2814610738578063e33b7de314610757578063e985e9c51461076b578063ef8d10f51461078a578063f242432a146107b6578063f2fde38b146107d5575f80fd5b8063aeb61fea14610672578063b390c0ab14610691578063b8f73003146106b0578063bd85b039146106cf578063dc45c38114610719575f80fd5b80639852595c116100f95780639852595c146105c05780639b642de1146105f45780639ebeef5914610613578063a22cb46514610634578063a3f8eace14610653575f80fd5b806371b38f07146105155780637e608e911461053457806382f57d27146105535780638da5cb5b1461056657806395d89b41146105ac575f80fd5b80632eb2c2d6116101c05780636122cc35116101855780636122cc351461049d57806365e909d6146104bc5780636b915fe3146104db57806371130b33146104ee578063715018a614610501575f80fd5b80632eb2c2d6146103c657806339e4a01e146103e557806347df1fdf146104045780634e1273f4146104255780634f558e7914610451575f80fd5b80630e89341c116102065780630e89341c1461030357806318160ddd14610322578063191655871461035557806322dcb0a7146103745780632a55205a14610388575f80fd5b8062fdd58e1461024157806301ffc9a71461027357806302fa7c47146102a257806306842e24146102c357806306fdde03146102e2575b5f80fd5b34801561024c575f80fd5b5061026061025b36600461394b565b6107f4565b6040519081526020015b60405180910390f35b34801561027e575f80fd5b5061029261028d36600461398a565b610829565b604051901515815260200161026a565b3480156102ad575f80fd5b506102c16102bc3660046139bb565b610833565b005b3480156102ce575f80fd5b506102c16102dd366004613b3a565b610894565b3480156102ed575f80fd5b506102f6610bcb565b60405161026a9190613c90565b34801561030e575f80fd5b506102f661031d366004613ca2565b610c56565b34801561032d575f80fd5b507f4a593662ee04d27b6a00ebb31be7fe0c102c2ade82a7c5d764f2df05dc4e280154610260565b348015610360575f80fd5b506102c161036f366004613cb9565b610d18565b34801561037f575f80fd5b506102c1610daa565b348015610393575f80fd5b506103a76103a2366004613cd4565b610dff565b604080516001600160a01b03909316835260208301919091520161026a565b3480156103d1575f80fd5b506102c16103e0366004613d80565b610eed565b3480156103f0575f80fd5b506102c16103ff366004613e30565b610f1c565b34801561040f575f80fd5b506104186110c2565b60405161026a9190613f14565b348015610430575f80fd5b5061044461043f366004613f8a565b611195565b60405161026a9190613fed565b34801561045c575f80fd5b5061029261046b366004613ca2565b5f9081527f4a593662ee04d27b6a00ebb31be7fe0c102c2ade82a7c5d764f2df05dc4e28006020526040902054151590565b3480156104a8575f80fd5b506102c16104b7366004614010565b611264565b3480156104c7575f80fd5b506102c16104d6366004614049565b611310565b6102c16104e93660046140dc565b611503565b6102c16104fc36600461411b565b611670565b34801561050c575f80fd5b506102c161174e565b348015610520575f80fd5b506102c161052f366004613ca2565b611761565b34801561053f575f80fd5b506102c161054e36600461416b565b6117f4565b6102c161056136600461419c565b61183f565b348015610571575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546040516001600160a01b03909116815260200161026a565b3480156105b7575f80fd5b506102f66119ab565b3480156105cb575f80fd5b506102606105da366004613cb9565b6001600160a01b03165f9081526007602052604090205490565b3480156105ff575f80fd5b506102c161060e3660046141ca565b6119b8565b34801561061e575f80fd5b506106276119fe565b60405161026a91906142c8565b34801561063f575f80fd5b506102c161064e36600461433f565b611be6565b34801561065e575f80fd5b5061026061066d366004613cb9565b611bfa565b34801561067d575f80fd5b506102c161068c36600461436b565b611c27565b34801561069c575f80fd5b506102c16106ab366004613cd4565b611ce2565b3480156106bb575f80fd5b506102c16106ca3660046143a4565b611d4f565b3480156106da575f80fd5b506102606106e9366004613ca2565b5f9081527f4a593662ee04d27b6a00ebb31be7fe0c102c2ade82a7c5d764f2df05dc4e2800602052604090205490565b348015610724575f80fd5b506102c16107333660046143df565b611db7565b348015610743575f80fd5b506102c1610752366004613e30565b61209c565b348015610762575f80fd5b50600854610260565b348015610776575f80fd5b50610292610785366004614418565b6120d9565b348015610795575f80fd5b506107a96107a4366004613ca2565b612125565b60405161026a9190614444565b3480156107c1575f80fd5b506102c16107d0366004614456565b612266565b3480156107e0575f80fd5b506102c16107ef366004613cb9565b61228d565b5f8181525f80516020614c35833981519152602090815260408083206001600160a01b03861684529091529020545b92915050565b5f610823826122ca565b61083b6122ee565b6108458282612349565b604080516001600160a01b03841681526001600160601b03831660208201527f8039bd6e4e7dba001c8840eb2e118d9d131246faa7d0d04335f7305127ec0b1091015b60405180910390a15050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f811580156108d85750825b90505f826001600160401b031660011480156108f35750303b155b905081158015610901575080155b1561091f5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561094957845460ff60401b1916600160401b1785555b6109528d61240b565b61095b3361241c565b8a606481111561097e57604051633a4733d960e11b815260040160405180910390fd5b6109878a61242d565b5f5b81811015610ae2575f8e8e838181106109a4576109a46144ad565b90506020028101906109b691906144c1565b6109c49060e08101906144df565b6109ce90806144f3565b90501115610a1057610a108e8e838181106109eb576109eb6144ad565b90506020028101906109fd91906144c1565b610a0b9060e08101906144df565b61242d565b610a828e8e83818110610a2557610a256144ad565b9050602002810190610a3791906144c1565b610a489060a0810190608001614538565b8f8f84818110610a5a57610a5a6144ad565b9050602002810190610a6c91906144c1565b610a7d9060c081019060a001614538565b612500565b8d8d82818110610a9457610a946144ad565b9050602002810190610aa691906144c1565b5f828152600460205260409020610abd828261471c565b50505f818152600460205260409020805463ffffffff60401b19169055600101610989565b506002819055896009610af582826146a7565b9050508f5f9081610b06919061488c565b508e60019081610b16919061488c565b506003805460ff19168a1515179055610b4a610b3560208d018d613cb9565b610b4560408e0160208f01614946565b612349565b610b5388612560565b610b73876001600160a01b03811615610b6d5760016125d0565b5f6125d0565b508315610bba57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050505050505050565b5f8054610bd790614823565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0390614823565b8015610c4e5780601f10610c2557610100808354040283529160200191610c4e565b820191905f5260205f20905b815481529060010190602001808311610c3157829003601f168201915b505050505081565b7f88be536d5240c274a3b1d3a1be54482fd9caa294f08c62a7cde569f49a3c450280546060915f80516020614c3583398151915291610c9490614823565b80601f0160208091040260200160405190810160405280929190818152602001828054610cc090614823565b8015610d0b5780601f10610ce257610100808354040283529160200191610d0b565b820191905f5260205f20905b815481529060010190602001808311610cee57829003601f168201915b5050505050915050919050565b5f610d2282611bfa565b90508015610da6578060085f828254610d3b919061495f565b90915550506001600160a01b0382165f908152600760205260409020805482019055610d678282612748565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0569101610888565b5050565b610db26122ee565b6003805460ff8082161560ff1990921682179092556040519116151581527f1509137b40df48e8ef9596f9db16b632b15353d0e0688d9f23221953eb0328dd9060200160405180910390a1565b5f8281527fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b01602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282917fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b009190610eb457506040805180820190915281546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101515f9061271090610ed2906001600160601b031688614573565b610edc9190614972565b9151945090925050505b9250929050565b846001600160a01b0381163314610f0757610f073361285d565b610f148686868686612914565b505050505050565b610f246122ee565b60025481905f5b828110156110b9575f858583818110610f4657610f466144ad565b9050602002810190610f5891906144c1565b610f669060e08101906144df565b610f7090806144f3565b90501115610f8d57610f8d8585838181106109eb576109eb6144ad565b5f858583818110610fa057610fa06144ad565b9050602002810190610fb291906144c1565b610fbb90614a1e565b9050610fcf81608001518260a00151612500565b5f604082810182815285835260046020818152929093208451815484870151935163ffffffff92831667ffffffffffffffff1992831617600160201b95841686021763ffffffff60401b1916600160401b9184169190910217835560608701516001840155608087015160028401805460a08a015192851693169290921792169093021790915560c0840151600382015560e08401518051805188958795908501926110819284929190910190613806565b50602082810151805161109a9260018501920190613869565b505050905050836110aa90614aca565b93508260010192505050610f2b565b50600255505050565b604080518082019091526060808252602082015260408051600980546060602082028401810185529383018181529293919284929091849184018282801561113157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611113575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561118757602002820191905f5260205f20905b815481526020019060010190808311611173575b505050505081525050905090565b606081518351146111cb5781518351604051635b05999160e01b8152600481019290925260248201526044015b60405180910390fd5b5f83516001600160401b038111156111e5576111e56139ee565b60405190808252806020026020018201604052801561120e578160200160208202803683370190505b5090505f5b845181101561125c57602080820286010151611237906020808402870101516107f4565b828281518110611249576112496144ad565b6020908102919091010152600101611213565b509392505050565b61126c6122ee565b5f61127a60e08301836144df565b61128490806144f3565b9050111561129c5761129c610a0b60e08301836144df565b6112bf6112af60a0830160808401614538565b610a7d60c0840160a08501614538565b6002545f81815260046020526040902082906112db828261471c565b50505f818152600460205260408120805463ffffffff60401b191690556002805490919061130890614aca565b909155505050565b6113186122ee565b600254851061133a5760405163c1ab6dc160e01b815260040160405180910390fd5b805f84821461135c5760405163e6dcad7760e01b815260040160405180910390fd5b5f878152600460205260408120905b838110156114bf575f888883818110611386576113866144ad565b905060200201602081019061139b9190614538565b83546113b49190600160401b900463ffffffff16614ae2565b835490915063ffffffff16158015906113d75750825463ffffffff908116908216115b156113f5576040516352df9fe560e01b815260040160405180910390fd5b825463ffffffff60401b1916600160401b63ffffffff831602178355888883818110611423576114236144ad565b90506020020160208101906114389190614538565b6114489063ffffffff168561495f565b93506114b687878481811061145f5761145f6144ad565b90506020020160208101906114749190613cb9565b8b8b8b86818110611487576114876144ad565b905060200201602081019061149c9190614538565b63ffffffff1660405180602001604052805f815250612973565b5060010161136b565b5060408051848152602081018490527f71cc7095cc35ed4701c217a8efb440732eb0737da67f6548c008ac26fba95464910160405180910390a15050505050505050565b5f828152600460208181526040808420815161010081018352815463ffffffff8082168352600160201b808304821684880152600160401b909204811683860152600184015460608085019190915260028501548083166080860152929092041660a0830152600383015460c0830152835195830180549586028701820185529386018581529195929460e0870194928492909184918401828280156115d057602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116115b2575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561162657602002820191905f5260205f20905b815481526020019060010190808311611612575b5050509190925250505090525060608101519091501561165957604051634d0ee1f560e11b815260040160405180910390fd5b61166a8434858585602001516129ce565b50505050565b5f858152600460205260409020600101548061169f57604051634d0ee1f560e11b815260040160405180910390fd5b6117248383808060200260200160405190810160405280939291908181526020018383602002808284375f92019190915250506040516bffffffffffffffffffffffff193360601b1660208201526001600160e01b031960e08a901b166034820152859250603801905060405160208183030381529060405280519060200120612ccd565b611741576040516309bde33960e01b815260040160405180910390fd5b610f1433348888886129ce565b6117566122ee565b61175f5f612560565b565b6117696122ee565b5f8181526004602052604081208054909163ffffffff90911690036117a15760405163c1ab6dc160e01b815260040160405180910390fd5b8054600160401b810463ffffffff1663ffffffff19909116811782556040805184815260208101929092527fe7ff034533cbe8553f05d7bfe28543225de5f9589f0637e2e851c8fad322fd499101610888565b6117fc6122ee565b6118058161242d565b80600961181282826146a7565b50506040517fb855aa79dff5fe918a28a8a1d8101db624120176786f8e2658f354b0e68654d0905f90a150565b5f828152600460208181526040808420815161010081018352815463ffffffff8082168352600160201b808304821684880152600160401b909204811683860152600184015460608085019190915260028501548083166080860152929092041660a0830152600383015460c0830152835195830180549586028701820185529386018581529195929460e08701949284929091849184018282801561190c57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116118ee575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561196257602002820191905f5260205f20905b81548152602001906001019080831161194e575b5050509190925250505090525060608101519091501561199557604051634d0ee1f560e11b815260040160405180910390fd5b6119a63334858585602001516129ce565b505050565b60018054610bd790614823565b6119c06122ee565b610da682828080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250612ce292505050565b6002546060905f816001600160401b03811115611a1d57611a1d6139ee565b604051908082528060200260200182016040528015611a5657816020015b611a436138a2565b815260200190600190039081611a3b5790505b5090505f5b82811015611bdf575f81815260046020818152604092839020835161010081018552815463ffffffff8082168352600160201b808304821684870152600160401b909204811683880152600184015460608085019190915260028501548083166080860152929092041660a0830152600383015460c0830152855194830180549485028601820187529585018481529195929460e0870194909392849290918491840182828015611b3357602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611b15575b5050505050815260200160018201805480602002602001604051908101604052809291908181526020018280548015611b8957602002820191905f5260205f20905b815481526020019060010190808311611b75575b50505050508152505081525050828281518110611ba857611ba86144ad565b60200260200101515f018190525080828281518110611bc957611bc96144ad565b6020908102919091018101510152600101611a5b565b5092915050565b81611bf08161285d565b6119a68383612d1b565b6001600160a01b0381165f9081526007602090815260408083205460069092528220546108239190614afe565b611c2f6122ee565b6002548210611c515760405163c1ab6dc160e01b815260040160405180910390fd5b5f82815260046020526040902054600160401b900463ffffffff1615611c8a5760405163fa2844a560e01b815260040160405180910390fd5b611c938161242d565b5f828152600460208190526040909120829101611cb082826146a7565b50506040518281527f71c8525fc38b77b64a66d848a818337505e69f1eacce1994cc6ca727e16d78c290602001610888565b60035460ff16611d055760405163fa32799b60e01b815260040160405180910390fd5b611d10338383612d26565b604080518381526020810183905233917fde3ca466246b0da455138dbea78dacd91d3c40dc98d5846ff0193bf67c24b0e7910160405180910390a25050565b611d576122ee565b611d62838383612d93565b604080518481526001600160a01b03841660208201526001600160601b0383168183015290517fe361b60b9164428d036a601ec08552e653bfe8c44389b8a4ebfd47281eb8741a9181900360600190a1505050565b611dbf6122ee565b6002548210611de15760405163c1ab6dc160e01b815260040160405180910390fd5b5f828152600460208181526040808420815161010081018352815463ffffffff8082168352600160201b808304821684880152600160401b909204811683860152600184015460608085019190915260028501548083166080860152929092041660a0830152600383015460c0830152835195830180549586028701820185529386018581529195929460e087019492849290918491840182828015611eae57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611e90575b5050505050815260200160018201805480602002602001604051908101604052809291908181526020018280548015611f0457602002820191905f5260205f20905b815481526020019060010190808311611ef0575b50505091909252505050905250604081015160e08201519192509063ffffffff821615801590611fa65750825163ffffffff16611f446020860186614538565b63ffffffff16141580611f795750826080015163ffffffff16846080016020810190611f709190614538565b63ffffffff1614155b80611fa657508260a0015163ffffffff168460a0016020810190611f9d9190614538565b63ffffffff1614155b15611fc45760405163fa2844a560e01b815260040160405180910390fd5b611fe7611fd760a0860160808701614538565b610a7d60c0870160a08801614538565b5f8581526004602052604090208490612000828261471c565b50505f858152600460208181526040909220805463ffffffff60401b1916600160401b63ffffffff87160217815583518051859492909301926120469284920190613806565b50602082810151805161205f9260018501920190613869565b50506040518681527f4040cd6ff4eef67e86ab078c16c2514c123f7b8782aa574307eaf34c726f3ef5915060200160405180910390a15050505050565b805f5b8181101561166a576120d18484838181106120bc576120bc6144ad565b905060200201602081019061036f9190613cb9565b60010161209f565b6001600160a01b039182165f9081527f88be536d5240c274a3b1d3a1be54482fd9caa294f08c62a7cde569f49a3c45016020908152604080832093909416825291909152205460ff1690565b61212d6138c1565b5f82815260046020818152604092839020835161010081018552815463ffffffff8082168352600160201b808304821684870152600160401b909204811683880152600184015460608085019190915260028501548083166080860152929092041660a0830152600383015460c0830152855194830180549485028601820187529585018481529195929460e08701949093928492909184918401828280156121fd57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116121df575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561225357602002820191905f5260205f20905b81548152602001906001019080831161223f575b5050509190925250505090525092915050565b846001600160a01b0381163314612280576122803361285d565b610f148686868686612e76565b6122956122ee565b6001600160a01b0381166122be57604051631e4fbdf760e01b81525f60048201526024016111c2565b6122c781612560565b50565b5f6001600160e01b0319821663152a902d60e11b1480610823575061082382612ed5565b336123207f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461175f5760405163118cdaa760e01b81523360048201526024016111c2565b7fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b006127106001600160601b0383168110156123a957604051636f483d0960e01b81526001600160601b0384166004820152602481018290526044016111c2565b6001600160a01b0384166123d257604051635b6cc80560e11b81525f60048201526024016111c2565b50604080518082019091526001600160a01b039093168084526001600160601b039092166020909301839052600160a01b909202179055565b612413612f24565b6122c781612f6d565b612424612f24565b6122c781612f7e565b5f8061243983806144f3565b915061244a905060208401846144f3565b90508114158061245a5750600481115b1561247857604051630d5ca8b560e31b815260040160405180910390fd5b5f5b818110156124de575f61249060208601866144f3565b838181106124a0576124a06144ad565b905060200201359050805f036124c957604051630d5ca8b560e31b815260040160405180910390fd5b6124d3818561495f565b93505060010161247a565b50816064146119a657604051630d5ca8b560e31b815260040160405180910390fd5b63ffffffff811615610da6578163ffffffff168163ffffffff1610156125395760405163427f0ccd60e11b815260040160405180910390fd5b428163ffffffff161015610da65760405163427f0ccd60e11b815260040160405180910390fd5b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b6125d8612f24565b6daaeb6d7670e522a718067333cd4e3b15610da65760405163c3c5a54760e01b81523060048201526daaeb6d7670e522a718067333cd4e9063c3c5a547906024016020604051808303815f875af1158015612635573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126599190614b11565b610da65780156126c857604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b5f604051808303815f87803b1580156126b6575f80fd5b505af1158015610f14573d5f803e3d5ffd5b6001600160a01b038216156127175760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440161269f565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e4869060240161269f565b804710156127985760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016111c2565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f81146127e1576040519150601f19603f3d011682016040523d82523d5f602084013e6127e6565b606091505b50509050806119a65760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016111c2565b6daaeb6d7670e522a718067333cd4e3b156122c757604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156128c8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128ec9190614b11565b6122c757604051633b79c77360e21b81526001600160a01b03821660048201526024016111c2565b336001600160a01b0386168114801590612935575061293386826120d9565b155b156129665760405163711bec9160e11b81526001600160a01b038083166004830152871660248201526044016111c2565b610f148686868686612f86565b6001600160a01b03841661299c57604051632bfa23e760e11b81525f60048201526024016111c2565b60408051600180825260208201869052818301908152606082018590526080820190925290610f145f87848487612fe0565b60025483106129f05760405163c1ab6dc160e01b815260040160405180910390fd5b5f8381526004602052604090206003810154612a139063ffffffff851690614573565b8514612a315760405162bfc92160e01b815260040160405180910390fd5b805463ffffffff1615801590612a685750805463ffffffff80821691612a60918691600160401b900416614ae2565b63ffffffff16115b15612a86576040516352df9fe560e01b815260040160405180910390fd5b5f8263ffffffff16118015612ae157505f8481526005602090815260408083206001600160a01b038a16845290915290205463ffffffff80841691612ad6918616906001600160401b0316614b2c565b6001600160401b0316115b15612aff57604051636c80554560e11b815260040160405180910390fd5b600281015463ffffffff1615801590612b215750600281015463ffffffff1642105b15612b3f5760405163914edb0f60e01b815260040160405180910390fd5b6002810154600160201b900463ffffffff1615801590612b6f57506002810154600160201b900463ffffffff1642115b15612b8d5760405163914edb0f60e01b815260040160405180910390fd5b8415612bbd5760048101548015612bb057612bab8683600401613033565b612bbb565b612bbb866009613033565b505b805483908290600890612bde908490600160401b900463ffffffff16614ae2565b82546101009290920a63ffffffff8181021990931691831602179091555f8681526005602090815260408083206001600160a01b038c16845290915281208054928716935091612c389084906001600160401b0316614b2c565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550612c7c86858563ffffffff1660405180602001604052805f815250612973565b6040805185815263ffffffff851660208201526001600160a01b038816917f2e8ac5177a616f2aec08c3048f5021e4e9743ece034e8d83ba5caf76688bb475910160405180910390a2505050505050565b5f82612cd985846130e1565b14949350505050565b5f80516020614c358339815191527f88be536d5240c274a3b1d3a1be54482fd9caa294f08c62a7cde569f49a3c45026119a6838261488c565b610da633838361311b565b6001600160a01b038316612d4e57604051626a0d4560e21b81525f60048201526024016111c2565b604080516001808252602082018590528183019081526060820184905260a082019092525f60808201818152919291612d8c91879185908590612fe0565b5050505050565b7fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b006127106001600160601b038316811015612dfa5760405163dfd1fc1b60e01b8152600481018690526001600160601b0384166024820152604481018290526064016111c2565b6001600160a01b038416612e2a57604051634b4f842960e11b8152600481018690525f60248201526044016111c2565b506040805180820182526001600160a01b0394851681526001600160601b0393841660208083019182525f9788526001909401909352942093519051909116600160a01b029116179055565b336001600160a01b0386168114801590612e975750612e9586826120d9565b155b15612ec85760405163711bec9160e11b81526001600160a01b038083166004830152871660248201526044016111c2565b610f1486868686866131c0565b5f6001600160e01b03198216636cdb3d1360e11b1480612f0557506001600160e01b031982166303a24d0760e21b145b8061082357506301ffc9a760e01b6001600160e01b0319831614610823565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661175f57604051631afcd79f60e31b815260040160405180910390fd5b612f75612f24565b6122c781612ce2565b612295612f24565b6001600160a01b038416612faf57604051632bfa23e760e11b81525f60048201526024016111c2565b6001600160a01b038516612fd757604051626a0d4560e21b81525f60048201526024016111c2565b612d8c85858585855b612fec8585858561324c565b6001600160a01b03841615612d8c5782513390600103613025576020848101519084015161301e8389898585896133b0565b5050610f14565b610f148187878787876134d1565b80545f5b8181101561166a575f835f018281548110613054576130546144ad565b5f9182526020822001546001860180546001600160a01b03909216935060649185908110613084576130846144ad565b905f5260205f200154876130989190614573565b6130a29190614972565b6001600160a01b0383165f908152600660205260408120805492935083929091906130ce90849061495f565b9091555050600190920191506130379050565b5f81815b845181101561125c5761311182868381518110613104576131046144ad565b60200260200101516135b8565b91506001016130e5565b5f80516020614c358339815191526001600160a01b0383166131515760405162ced3e160e81b81525f60048201526024016111c2565b6001600160a01b038481165f818152600184016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b6001600160a01b0384166131e957604051632bfa23e760e11b81525f60048201526024016111c2565b6001600160a01b03851661321157604051626a0d4560e21b81525f60048201526024016111c2565b604080516001808252602082018690528183019081526060820185905260808201909252906132438787848487612fe0565b50505050505050565b7f4a593662ee04d27b6a00ebb31be7fe0c102c2ade82a7c5d764f2df05dc4e2800613279858585856135e7565b6001600160a01b038516613320575f805b8451811015613305575f8482815181106132a6576132a66144ad565b6020026020010151905080845f015f8885815181106132c7576132c76144ad565b602002602001015181526020019081526020015f205f8282546132ea919061495f565b909155506132fa9050818461495f565b92505060010161328a565b5080826001015f828254613319919061495f565b9091555050505b6001600160a01b038416612d8c575f805b845181101561339c575f84828151811061334d5761334d6144ad565b6020026020010151905080845f015f88858151811061336e5761336e6144ad565b60209081029190910181015182528101919091526040015f2080549190910390559190910190600101613331565b506001820180549190910390555050505050565b6001600160a01b0384163b15610f145760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906133f49089908990889088908890600401614b4b565b6020604051808303815f875af192505050801561342e575060408051601f3d908101601f1916820190925261342b91810190614b8f565b60015b613495573d80801561345b576040519150601f19603f3d011682016040523d82523d5f602084013e613460565b606091505b5080515f0361348d57604051632bfa23e760e11b81526001600160a01b03861660048201526024016111c2565b805181602001fd5b6001600160e01b0319811663f23a6e6160e01b1461324357604051632bfa23e760e11b81526001600160a01b03861660048201526024016111c2565b6001600160a01b0384163b15610f145760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906135159089908990889088908890600401614baa565b6020604051808303815f875af192505050801561354f575060408051601f3d908101601f1916820190925261354c91810190614b8f565b60015b61357c573d80801561345b576040519150601f19603f3d011682016040523d82523d5f602084013e613460565b6001600160e01b0319811663bc197c8160e01b1461324357604051632bfa23e760e11b81526001600160a01b03861660048201526024016111c2565b5f8183106135d2575f8281526020849052604090206135e0565b5f8381526020839052604090205b9392505050565b805182515f80516020614c3583398151915291146136255782518251604051635b05999160e01b8152600481019290925260248201526044016111c2565b335f5b8451811015613727576020818102868101820151908601909101516001600160a01b038916156136d9575f828152602086815260408083206001600160a01b038d168452909152902054818110156136b3576040516303dee4c560e01b81526001600160a01b038b1660048201526024810182905260448101839052606481018490526084016111c2565b5f838152602087815260408083206001600160a01b038e16845290915290209082900390555b6001600160a01b0388161561371d575f828152602086815260408083206001600160a01b038c1684529091528120805483929061371790849061495f565b90915550505b5050600101613628565b5083516001036137a75760208401515f906020850151909150866001600160a01b0316886001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051613798929190918252602082015260400190565b60405180910390a45050610f14565b846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516137f6929190614c07565b60405180910390a4505050505050565b828054828255905f5260205f20908101928215613859579160200282015b8281111561385957825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613824565b50613865929150613913565b5090565b828054828255905f5260205f20908101928215613859579160200282015b82811115613859578251825591602001919060010190613887565b60405180604001604052806138b56138c1565b81526020015f81525090565b60408051610100810182525f808252602080830182905282840182905260608084018390526080840183905260a0840183905260c084019290925283518085019094528184528301529060e082015290565b5b80821115613865575f8155600101613914565b6001600160a01b03811681146122c7575f80fd5b803561394681613927565b919050565b5f806040838503121561395c575f80fd5b823561396781613927565b946020939093013593505050565b6001600160e01b0319811681146122c7575f80fd5b5f6020828403121561399a575f80fd5b81356135e081613975565b80356001600160601b0381168114613946575f80fd5b5f80604083850312156139cc575f80fd5b82356139d781613927565b91506139e5602084016139a5565b90509250929050565b634e487b7160e01b5f52604160045260245ffd5b60405161010081016001600160401b0381118282101715613a2557613a256139ee565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613a5357613a536139ee565b604052919050565b5f82601f830112613a6a575f80fd5b8135602083015f806001600160401b03841115613a8957613a896139ee565b50601f8301601f1916602001613a9e81613a2b565b915050828152858383011115613ab2575f80fd5b828260208301375f92810160200192909252509392505050565b5f8083601f840112613adc575f80fd5b5081356001600160401b03811115613af2575f80fd5b6020830191508360208260051b8501011115610ee6575f80fd5b5f60408284031215613b1c575f80fd5b50919050565b80151581146122c7575f80fd5b803561394681613b22565b5f805f805f805f805f806101408b8d031215613b54575f80fd5b8a356001600160401b03811115613b69575f80fd5b613b758d828e01613a5b565b9a505060208b01356001600160401b03811115613b90575f80fd5b613b9c8d828e01613a5b565b99505060408b01356001600160401b03811115613bb7575f80fd5b613bc38d828e01613a5b565b98505060608b01356001600160401b03811115613bde575f80fd5b613bea8d828e01613acc565b9098509650613bfe90508c60808d01613b0c565b945060c08b01356001600160401b03811115613c18575f80fd5b613c248d828e01613b0c565b945050613c3360e08c01613b2f565b9250613c426101008c0161393b565b9150613c516101208c0161393b565b90509295989b9194979a5092959850565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6135e06020830184613c62565b5f60208284031215613cb2575f80fd5b5035919050565b5f60208284031215613cc9575f80fd5b81356135e081613927565b5f8060408385031215613ce5575f80fd5b50508035926020909101359150565b5f6001600160401b03821115613d0c57613d0c6139ee565b5060051b60200190565b5f82601f830112613d25575f80fd5b8135613d38613d3382613cf4565b613a2b565b8082825260208201915060208360051b860101925085831115613d59575f80fd5b602085015b83811015613d76578035835260209283019201613d5e565b5095945050505050565b5f805f805f60a08688031215613d94575f80fd5b8535613d9f81613927565b94506020860135613daf81613927565b935060408601356001600160401b03811115613dc9575f80fd5b613dd588828901613d16565b93505060608601356001600160401b03811115613df0575f80fd5b613dfc88828901613d16565b92505060808601356001600160401b03811115613e17575f80fd5b613e2388828901613a5b565b9150509295509295909350565b5f8060208385031215613e41575f80fd5b82356001600160401b03811115613e56575f80fd5b613e6285828601613acc565b90969095509350505050565b5f8151808452602084019350602083015f5b82811015613e9e578151865260209586019590910190600101613e80565b5093949350505050565b8051604080845281519084018190525f9160200190829060608601905b80831015613ef05783516001600160a01b031682526020938401936001939093019290910190613ec5565b50602085015192508581036020870152613f0a8184613e6e565b9695505050505050565b602081525f6135e06020830184613ea8565b5f82601f830112613f35575f80fd5b8135613f43613d3382613cf4565b8082825260208201915060208360051b860101925085831115613f64575f80fd5b602085015b83811015613d76578035613f7c81613927565b835260209283019201613f69565b5f8060408385031215613f9b575f80fd5b82356001600160401b03811115613fb0575f80fd5b613fbc85828601613f26565b92505060208301356001600160401b03811115613fd7575f80fd5b613fe385828601613d16565b9150509250929050565b602081525f6135e06020830184613e6e565b5f6101008284031215613b1c575f80fd5b5f60208284031215614020575f80fd5b81356001600160401b03811115614035575f80fd5b61404184828501613fff565b949350505050565b5f805f805f6060868803121561405d575f80fd5b8535945060208601356001600160401b03811115614079575f80fd5b61408588828901613acc565b90955093505060408601356001600160401b038111156140a3575f80fd5b6140af88828901613acc565b969995985093965092949392505050565b63ffffffff811681146122c7575f80fd5b8035613946816140c0565b5f805f606084860312156140ee575f80fd5b83356140f981613927565b9250602084013591506040840135614110816140c0565b809150509250925092565b5f805f805f6080868803121561412f575f80fd5b853594506020860135614141816140c0565b93506040860135614151816140c0565b925060608601356001600160401b038111156140a3575f80fd5b5f6020828403121561417b575f80fd5b81356001600160401b03811115614190575f80fd5b61404184828501613b0c565b5f80604083850312156141ad575f80fd5b8235915060208301356141bf816140c0565b809150509250929050565b5f80602083850312156141db575f80fd5b82356001600160401b038111156141f0575f80fd5b8301601f81018513614200575f80fd5b80356001600160401b03811115614215575f80fd5b856020828401011115614226575f80fd5b6020919091019590945092505050565b63ffffffff815116825263ffffffff60208201511660208301525f6040820151614268604085018263ffffffff169052565b5060608201516060840152608082015161428a608085018263ffffffff169052565b5060a08201516142a260a085018263ffffffff169052565b5060c082015160c084015260e082015161010060e0850152614041610100850182613ea8565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561433357603f1987860301845281518051604087526143146040880182614236565b60209283015197830197909752509384019391909101906001016142ee565b50929695505050505050565b5f8060408385031215614350575f80fd5b823561435b81613927565b915060208301356141bf81613b22565b5f806040838503121561437c575f80fd5b8235915060208301356001600160401b03811115614398575f80fd5b613fe385828601613b0c565b5f805f606084860312156143b6575f80fd5b8335925060208401356143c881613927565b91506143d6604085016139a5565b90509250925092565b5f80604083850312156143f0575f80fd5b8235915060208301356001600160401b0381111561440c575f80fd5b613fe385828601613fff565b5f8060408385031215614429575f80fd5b823561443481613927565b915060208301356141bf81613927565b602081525f6135e06020830184614236565b5f805f805f60a0868803121561446a575f80fd5b853561447581613927565b9450602086013561448581613927565b9350604086013592506060860135915060808601356001600160401b03811115613e17575f80fd5b634e487b7160e01b5f52603260045260245ffd5b5f823560fe198336030181126144d5575f80fd5b9190910192915050565b5f8235603e198336030181126144d5575f80fd5b5f808335601e19843603018112614508575f80fd5b8301803591506001600160401b03821115614521575f80fd5b6020019150600581901b3603821315610ee6575f80fd5b5f60208284031215614548575f80fd5b81356135e0816140c0565b5f8135610823816140c0565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176108235761082361455f565b5b81811015610da6575f815560010161458b565b818310156119a657805f5260205f2061166a83820185830161458a565b6145c582836144f3565b6001600160401b038111156145dc576145dc6139ee565b600160401b8111156145f0576145f06139ee565b825481845561460082828661459e565b50825f5260205f205f5b8281101561463057833561461d81613927565b828201556020939093019260010161460a565b505050506001810161464560208401846144f3565b6001600160401b0381111561465c5761465c6139ee565b600160401b811115614670576146706139ee565b825481845561468082828661459e565b505f92835260208320925b81811015610f145782358482015560209092019160010161468b565b6146b182836144f3565b6001600160401b038111156146c8576146c86139ee565b600160401b8111156146dc576146dc6139ee565b82548184556146ec82828661459e565b50825f5260205f205f5b8281101561463057833561470981613927565b82820155602093909301926001016146f6565b8135614727816140c0565b815463ffffffff191663ffffffff8216178255506020820135614749816140c0565b815467ffffffff000000001916602082901b67ffffffff0000000016178255506040820135614777816140c0565b815463ffffffff60401b191660409190911b6bffffffff00000000000000001617815560608201356001820155600281016147ce6147b760808501614553565b825463ffffffff191663ffffffff91909116178255565b6147ff6147dd60a08501614553565b825467ffffffff00000000191660209190911b67ffffffff0000000016178255565b5060c08201356003820155610da661481a60e08401846144df565b600483016145bb565b600181811c9082168061483757607f821691505b602082108103613b1c57634e487b7160e01b5f52602260045260245ffd5b601f8211156119a657805f5260205f20601f840160051c8101602085101561487a5750805b612d8c601f850160051c83018261458a565b81516001600160401b038111156148a5576148a56139ee565b6148b9816148b38454614823565b84614855565b6020601f8211600181146148eb575f83156148d45750848201515b5f19600385901b1c1916600184901b178455612d8c565b5f84815260208120601f198516915b8281101561491a57878501518255602094850194600190920191016148fa565b508482101561493757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f60208284031215614956575f80fd5b6135e0826139a5565b808201808211156108235761082361455f565b5f8261498c57634e487b7160e01b5f52601260045260245ffd5b500490565b5f604082840312156149a1575f80fd5b604080519081016001600160401b03811182821017156149c3576149c36139ee565b60405290508082356001600160401b038111156149de575f80fd5b6149ea85828601613f26565b82525060208301356001600160401b03811115614a05575f80fd5b614a1185828601613d16565b6020830152505092915050565b5f6101008236031215614a2f575f80fd5b614a37613a02565b614a40836140d1565b8152614a4e602084016140d1565b6020820152614a5f604084016140d1565b604082015260608381013590820152614a7a608084016140d1565b6080820152614a8b60a084016140d1565b60a082015260c0838101359082015260e08301356001600160401b03811115614ab2575f80fd5b614abe36828601614991565b60e08301525092915050565b5f60018201614adb57614adb61455f565b5060010190565b63ffffffff81811683821601908111156108235761082361455f565b818103818111156108235761082361455f565b5f60208284031215614b21575f80fd5b81516135e081613b22565b6001600160401b0381811683821601908111156108235761082361455f565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f90614b8490830184613c62565b979650505050505050565b5f60208284031215614b9f575f80fd5b81516135e081613975565b6001600160a01b0386811682528516602082015260a0604082018190525f90614bd590830186613e6e565b8281036060840152614be78186613e6e565b90508281036080840152614bfb8185613c62565b98975050505050505050565b604081525f614c196040830185613e6e565b8281036020840152614c2b8185613e6e565b9594505050505056fe88be536d5240c274a3b1d3a1be54482fd9caa294f08c62a7cde569f49a3c4500a2646970667358221220f69cb89b0b3638e13d5156b38caff43ec1bd8ff7fe78b0550052a78bea6910f864736f6c634300081a0033

Deployed Bytecode

0x60806040526004361061023d575f3560e01c806371b38f0711610134578063aeb61fea116100b3578063df745d2811610078578063df745d2814610738578063e33b7de314610757578063e985e9c51461076b578063ef8d10f51461078a578063f242432a146107b6578063f2fde38b146107d5575f80fd5b8063aeb61fea14610672578063b390c0ab14610691578063b8f73003146106b0578063bd85b039146106cf578063dc45c38114610719575f80fd5b80639852595c116100f95780639852595c146105c05780639b642de1146105f45780639ebeef5914610613578063a22cb46514610634578063a3f8eace14610653575f80fd5b806371b38f07146105155780637e608e911461053457806382f57d27146105535780638da5cb5b1461056657806395d89b41146105ac575f80fd5b80632eb2c2d6116101c05780636122cc35116101855780636122cc351461049d57806365e909d6146104bc5780636b915fe3146104db57806371130b33146104ee578063715018a614610501575f80fd5b80632eb2c2d6146103c657806339e4a01e146103e557806347df1fdf146104045780634e1273f4146104255780634f558e7914610451575f80fd5b80630e89341c116102065780630e89341c1461030357806318160ddd14610322578063191655871461035557806322dcb0a7146103745780632a55205a14610388575f80fd5b8062fdd58e1461024157806301ffc9a71461027357806302fa7c47146102a257806306842e24146102c357806306fdde03146102e2575b5f80fd5b34801561024c575f80fd5b5061026061025b36600461394b565b6107f4565b6040519081526020015b60405180910390f35b34801561027e575f80fd5b5061029261028d36600461398a565b610829565b604051901515815260200161026a565b3480156102ad575f80fd5b506102c16102bc3660046139bb565b610833565b005b3480156102ce575f80fd5b506102c16102dd366004613b3a565b610894565b3480156102ed575f80fd5b506102f6610bcb565b60405161026a9190613c90565b34801561030e575f80fd5b506102f661031d366004613ca2565b610c56565b34801561032d575f80fd5b507f4a593662ee04d27b6a00ebb31be7fe0c102c2ade82a7c5d764f2df05dc4e280154610260565b348015610360575f80fd5b506102c161036f366004613cb9565b610d18565b34801561037f575f80fd5b506102c1610daa565b348015610393575f80fd5b506103a76103a2366004613cd4565b610dff565b604080516001600160a01b03909316835260208301919091520161026a565b3480156103d1575f80fd5b506102c16103e0366004613d80565b610eed565b3480156103f0575f80fd5b506102c16103ff366004613e30565b610f1c565b34801561040f575f80fd5b506104186110c2565b60405161026a9190613f14565b348015610430575f80fd5b5061044461043f366004613f8a565b611195565b60405161026a9190613fed565b34801561045c575f80fd5b5061029261046b366004613ca2565b5f9081527f4a593662ee04d27b6a00ebb31be7fe0c102c2ade82a7c5d764f2df05dc4e28006020526040902054151590565b3480156104a8575f80fd5b506102c16104b7366004614010565b611264565b3480156104c7575f80fd5b506102c16104d6366004614049565b611310565b6102c16104e93660046140dc565b611503565b6102c16104fc36600461411b565b611670565b34801561050c575f80fd5b506102c161174e565b348015610520575f80fd5b506102c161052f366004613ca2565b611761565b34801561053f575f80fd5b506102c161054e36600461416b565b6117f4565b6102c161056136600461419c565b61183f565b348015610571575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546040516001600160a01b03909116815260200161026a565b3480156105b7575f80fd5b506102f66119ab565b3480156105cb575f80fd5b506102606105da366004613cb9565b6001600160a01b03165f9081526007602052604090205490565b3480156105ff575f80fd5b506102c161060e3660046141ca565b6119b8565b34801561061e575f80fd5b506106276119fe565b60405161026a91906142c8565b34801561063f575f80fd5b506102c161064e36600461433f565b611be6565b34801561065e575f80fd5b5061026061066d366004613cb9565b611bfa565b34801561067d575f80fd5b506102c161068c36600461436b565b611c27565b34801561069c575f80fd5b506102c16106ab366004613cd4565b611ce2565b3480156106bb575f80fd5b506102c16106ca3660046143a4565b611d4f565b3480156106da575f80fd5b506102606106e9366004613ca2565b5f9081527f4a593662ee04d27b6a00ebb31be7fe0c102c2ade82a7c5d764f2df05dc4e2800602052604090205490565b348015610724575f80fd5b506102c16107333660046143df565b611db7565b348015610743575f80fd5b506102c1610752366004613e30565b61209c565b348015610762575f80fd5b50600854610260565b348015610776575f80fd5b50610292610785366004614418565b6120d9565b348015610795575f80fd5b506107a96107a4366004613ca2565b612125565b60405161026a9190614444565b3480156107c1575f80fd5b506102c16107d0366004614456565b612266565b3480156107e0575f80fd5b506102c16107ef366004613cb9565b61228d565b5f8181525f80516020614c35833981519152602090815260408083206001600160a01b03861684529091529020545b92915050565b5f610823826122ca565b61083b6122ee565b6108458282612349565b604080516001600160a01b03841681526001600160601b03831660208201527f8039bd6e4e7dba001c8840eb2e118d9d131246faa7d0d04335f7305127ec0b1091015b60405180910390a15050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f811580156108d85750825b90505f826001600160401b031660011480156108f35750303b155b905081158015610901575080155b1561091f5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561094957845460ff60401b1916600160401b1785555b6109528d61240b565b61095b3361241c565b8a606481111561097e57604051633a4733d960e11b815260040160405180910390fd5b6109878a61242d565b5f5b81811015610ae2575f8e8e838181106109a4576109a46144ad565b90506020028101906109b691906144c1565b6109c49060e08101906144df565b6109ce90806144f3565b90501115610a1057610a108e8e838181106109eb576109eb6144ad565b90506020028101906109fd91906144c1565b610a0b9060e08101906144df565b61242d565b610a828e8e83818110610a2557610a256144ad565b9050602002810190610a3791906144c1565b610a489060a0810190608001614538565b8f8f84818110610a5a57610a5a6144ad565b9050602002810190610a6c91906144c1565b610a7d9060c081019060a001614538565b612500565b8d8d82818110610a9457610a946144ad565b9050602002810190610aa691906144c1565b5f828152600460205260409020610abd828261471c565b50505f818152600460205260409020805463ffffffff60401b19169055600101610989565b506002819055896009610af582826146a7565b9050508f5f9081610b06919061488c565b508e60019081610b16919061488c565b506003805460ff19168a1515179055610b4a610b3560208d018d613cb9565b610b4560408e0160208f01614946565b612349565b610b5388612560565b610b73876001600160a01b03811615610b6d5760016125d0565b5f6125d0565b508315610bba57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050505050505050565b5f8054610bd790614823565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0390614823565b8015610c4e5780601f10610c2557610100808354040283529160200191610c4e565b820191905f5260205f20905b815481529060010190602001808311610c3157829003601f168201915b505050505081565b7f88be536d5240c274a3b1d3a1be54482fd9caa294f08c62a7cde569f49a3c450280546060915f80516020614c3583398151915291610c9490614823565b80601f0160208091040260200160405190810160405280929190818152602001828054610cc090614823565b8015610d0b5780601f10610ce257610100808354040283529160200191610d0b565b820191905f5260205f20905b815481529060010190602001808311610cee57829003601f168201915b5050505050915050919050565b5f610d2282611bfa565b90508015610da6578060085f828254610d3b919061495f565b90915550506001600160a01b0382165f908152600760205260409020805482019055610d678282612748565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0569101610888565b5050565b610db26122ee565b6003805460ff8082161560ff1990921682179092556040519116151581527f1509137b40df48e8ef9596f9db16b632b15353d0e0688d9f23221953eb0328dd9060200160405180910390a1565b5f8281527fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b01602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282917fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b009190610eb457506040805180820190915281546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101515f9061271090610ed2906001600160601b031688614573565b610edc9190614972565b9151945090925050505b9250929050565b846001600160a01b0381163314610f0757610f073361285d565b610f148686868686612914565b505050505050565b610f246122ee565b60025481905f5b828110156110b9575f858583818110610f4657610f466144ad565b9050602002810190610f5891906144c1565b610f669060e08101906144df565b610f7090806144f3565b90501115610f8d57610f8d8585838181106109eb576109eb6144ad565b5f858583818110610fa057610fa06144ad565b9050602002810190610fb291906144c1565b610fbb90614a1e565b9050610fcf81608001518260a00151612500565b5f604082810182815285835260046020818152929093208451815484870151935163ffffffff92831667ffffffffffffffff1992831617600160201b95841686021763ffffffff60401b1916600160401b9184169190910217835560608701516001840155608087015160028401805460a08a015192851693169290921792169093021790915560c0840151600382015560e08401518051805188958795908501926110819284929190910190613806565b50602082810151805161109a9260018501920190613869565b505050905050836110aa90614aca565b93508260010192505050610f2b565b50600255505050565b604080518082019091526060808252602082015260408051600980546060602082028401810185529383018181529293919284929091849184018282801561113157602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611113575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561118757602002820191905f5260205f20905b815481526020019060010190808311611173575b505050505081525050905090565b606081518351146111cb5781518351604051635b05999160e01b8152600481019290925260248201526044015b60405180910390fd5b5f83516001600160401b038111156111e5576111e56139ee565b60405190808252806020026020018201604052801561120e578160200160208202803683370190505b5090505f5b845181101561125c57602080820286010151611237906020808402870101516107f4565b828281518110611249576112496144ad565b6020908102919091010152600101611213565b509392505050565b61126c6122ee565b5f61127a60e08301836144df565b61128490806144f3565b9050111561129c5761129c610a0b60e08301836144df565b6112bf6112af60a0830160808401614538565b610a7d60c0840160a08501614538565b6002545f81815260046020526040902082906112db828261471c565b50505f818152600460205260408120805463ffffffff60401b191690556002805490919061130890614aca565b909155505050565b6113186122ee565b600254851061133a5760405163c1ab6dc160e01b815260040160405180910390fd5b805f84821461135c5760405163e6dcad7760e01b815260040160405180910390fd5b5f878152600460205260408120905b838110156114bf575f888883818110611386576113866144ad565b905060200201602081019061139b9190614538565b83546113b49190600160401b900463ffffffff16614ae2565b835490915063ffffffff16158015906113d75750825463ffffffff908116908216115b156113f5576040516352df9fe560e01b815260040160405180910390fd5b825463ffffffff60401b1916600160401b63ffffffff831602178355888883818110611423576114236144ad565b90506020020160208101906114389190614538565b6114489063ffffffff168561495f565b93506114b687878481811061145f5761145f6144ad565b90506020020160208101906114749190613cb9565b8b8b8b86818110611487576114876144ad565b905060200201602081019061149c9190614538565b63ffffffff1660405180602001604052805f815250612973565b5060010161136b565b5060408051848152602081018490527f71cc7095cc35ed4701c217a8efb440732eb0737da67f6548c008ac26fba95464910160405180910390a15050505050505050565b5f828152600460208181526040808420815161010081018352815463ffffffff8082168352600160201b808304821684880152600160401b909204811683860152600184015460608085019190915260028501548083166080860152929092041660a0830152600383015460c0830152835195830180549586028701820185529386018581529195929460e0870194928492909184918401828280156115d057602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116115b2575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561162657602002820191905f5260205f20905b815481526020019060010190808311611612575b5050509190925250505090525060608101519091501561165957604051634d0ee1f560e11b815260040160405180910390fd5b61166a8434858585602001516129ce565b50505050565b5f858152600460205260409020600101548061169f57604051634d0ee1f560e11b815260040160405180910390fd5b6117248383808060200260200160405190810160405280939291908181526020018383602002808284375f92019190915250506040516bffffffffffffffffffffffff193360601b1660208201526001600160e01b031960e08a901b166034820152859250603801905060405160208183030381529060405280519060200120612ccd565b611741576040516309bde33960e01b815260040160405180910390fd5b610f1433348888886129ce565b6117566122ee565b61175f5f612560565b565b6117696122ee565b5f8181526004602052604081208054909163ffffffff90911690036117a15760405163c1ab6dc160e01b815260040160405180910390fd5b8054600160401b810463ffffffff1663ffffffff19909116811782556040805184815260208101929092527fe7ff034533cbe8553f05d7bfe28543225de5f9589f0637e2e851c8fad322fd499101610888565b6117fc6122ee565b6118058161242d565b80600961181282826146a7565b50506040517fb855aa79dff5fe918a28a8a1d8101db624120176786f8e2658f354b0e68654d0905f90a150565b5f828152600460208181526040808420815161010081018352815463ffffffff8082168352600160201b808304821684880152600160401b909204811683860152600184015460608085019190915260028501548083166080860152929092041660a0830152600383015460c0830152835195830180549586028701820185529386018581529195929460e08701949284929091849184018282801561190c57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116118ee575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561196257602002820191905f5260205f20905b81548152602001906001019080831161194e575b5050509190925250505090525060608101519091501561199557604051634d0ee1f560e11b815260040160405180910390fd5b6119a63334858585602001516129ce565b505050565b60018054610bd790614823565b6119c06122ee565b610da682828080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250612ce292505050565b6002546060905f816001600160401b03811115611a1d57611a1d6139ee565b604051908082528060200260200182016040528015611a5657816020015b611a436138a2565b815260200190600190039081611a3b5790505b5090505f5b82811015611bdf575f81815260046020818152604092839020835161010081018552815463ffffffff8082168352600160201b808304821684870152600160401b909204811683880152600184015460608085019190915260028501548083166080860152929092041660a0830152600383015460c0830152855194830180549485028601820187529585018481529195929460e0870194909392849290918491840182828015611b3357602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611b15575b5050505050815260200160018201805480602002602001604051908101604052809291908181526020018280548015611b8957602002820191905f5260205f20905b815481526020019060010190808311611b75575b50505050508152505081525050828281518110611ba857611ba86144ad565b60200260200101515f018190525080828281518110611bc957611bc96144ad565b6020908102919091018101510152600101611a5b565b5092915050565b81611bf08161285d565b6119a68383612d1b565b6001600160a01b0381165f9081526007602090815260408083205460069092528220546108239190614afe565b611c2f6122ee565b6002548210611c515760405163c1ab6dc160e01b815260040160405180910390fd5b5f82815260046020526040902054600160401b900463ffffffff1615611c8a5760405163fa2844a560e01b815260040160405180910390fd5b611c938161242d565b5f828152600460208190526040909120829101611cb082826146a7565b50506040518281527f71c8525fc38b77b64a66d848a818337505e69f1eacce1994cc6ca727e16d78c290602001610888565b60035460ff16611d055760405163fa32799b60e01b815260040160405180910390fd5b611d10338383612d26565b604080518381526020810183905233917fde3ca466246b0da455138dbea78dacd91d3c40dc98d5846ff0193bf67c24b0e7910160405180910390a25050565b611d576122ee565b611d62838383612d93565b604080518481526001600160a01b03841660208201526001600160601b0383168183015290517fe361b60b9164428d036a601ec08552e653bfe8c44389b8a4ebfd47281eb8741a9181900360600190a1505050565b611dbf6122ee565b6002548210611de15760405163c1ab6dc160e01b815260040160405180910390fd5b5f828152600460208181526040808420815161010081018352815463ffffffff8082168352600160201b808304821684880152600160401b909204811683860152600184015460608085019190915260028501548083166080860152929092041660a0830152600383015460c0830152835195830180549586028701820185529386018581529195929460e087019492849290918491840182828015611eae57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611e90575b5050505050815260200160018201805480602002602001604051908101604052809291908181526020018280548015611f0457602002820191905f5260205f20905b815481526020019060010190808311611ef0575b50505091909252505050905250604081015160e08201519192509063ffffffff821615801590611fa65750825163ffffffff16611f446020860186614538565b63ffffffff16141580611f795750826080015163ffffffff16846080016020810190611f709190614538565b63ffffffff1614155b80611fa657508260a0015163ffffffff168460a0016020810190611f9d9190614538565b63ffffffff1614155b15611fc45760405163fa2844a560e01b815260040160405180910390fd5b611fe7611fd760a0860160808701614538565b610a7d60c0870160a08801614538565b5f8581526004602052604090208490612000828261471c565b50505f858152600460208181526040909220805463ffffffff60401b1916600160401b63ffffffff87160217815583518051859492909301926120469284920190613806565b50602082810151805161205f9260018501920190613869565b50506040518681527f4040cd6ff4eef67e86ab078c16c2514c123f7b8782aa574307eaf34c726f3ef5915060200160405180910390a15050505050565b805f5b8181101561166a576120d18484838181106120bc576120bc6144ad565b905060200201602081019061036f9190613cb9565b60010161209f565b6001600160a01b039182165f9081527f88be536d5240c274a3b1d3a1be54482fd9caa294f08c62a7cde569f49a3c45016020908152604080832093909416825291909152205460ff1690565b61212d6138c1565b5f82815260046020818152604092839020835161010081018552815463ffffffff8082168352600160201b808304821684870152600160401b909204811683880152600184015460608085019190915260028501548083166080860152929092041660a0830152600383015460c0830152855194830180549485028601820187529585018481529195929460e08701949093928492909184918401828280156121fd57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116121df575b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561225357602002820191905f5260205f20905b81548152602001906001019080831161223f575b5050509190925250505090525092915050565b846001600160a01b0381163314612280576122803361285d565b610f148686868686612e76565b6122956122ee565b6001600160a01b0381166122be57604051631e4fbdf760e01b81525f60048201526024016111c2565b6122c781612560565b50565b5f6001600160e01b0319821663152a902d60e11b1480610823575061082382612ed5565b336123207f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461175f5760405163118cdaa760e01b81523360048201526024016111c2565b7fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b006127106001600160601b0383168110156123a957604051636f483d0960e01b81526001600160601b0384166004820152602481018290526044016111c2565b6001600160a01b0384166123d257604051635b6cc80560e11b81525f60048201526024016111c2565b50604080518082019091526001600160a01b039093168084526001600160601b039092166020909301839052600160a01b909202179055565b612413612f24565b6122c781612f6d565b612424612f24565b6122c781612f7e565b5f8061243983806144f3565b915061244a905060208401846144f3565b90508114158061245a5750600481115b1561247857604051630d5ca8b560e31b815260040160405180910390fd5b5f5b818110156124de575f61249060208601866144f3565b838181106124a0576124a06144ad565b905060200201359050805f036124c957604051630d5ca8b560e31b815260040160405180910390fd5b6124d3818561495f565b93505060010161247a565b50816064146119a657604051630d5ca8b560e31b815260040160405180910390fd5b63ffffffff811615610da6578163ffffffff168163ffffffff1610156125395760405163427f0ccd60e11b815260040160405180910390fd5b428163ffffffff161015610da65760405163427f0ccd60e11b815260040160405180910390fd5b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b6125d8612f24565b6daaeb6d7670e522a718067333cd4e3b15610da65760405163c3c5a54760e01b81523060048201526daaeb6d7670e522a718067333cd4e9063c3c5a547906024016020604051808303815f875af1158015612635573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126599190614b11565b610da65780156126c857604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b5f604051808303815f87803b1580156126b6575f80fd5b505af1158015610f14573d5f803e3d5ffd5b6001600160a01b038216156127175760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440161269f565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e4869060240161269f565b804710156127985760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016111c2565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f81146127e1576040519150601f19603f3d011682016040523d82523d5f602084013e6127e6565b606091505b50509050806119a65760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016111c2565b6daaeb6d7670e522a718067333cd4e3b156122c757604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156128c8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128ec9190614b11565b6122c757604051633b79c77360e21b81526001600160a01b03821660048201526024016111c2565b336001600160a01b0386168114801590612935575061293386826120d9565b155b156129665760405163711bec9160e11b81526001600160a01b038083166004830152871660248201526044016111c2565b610f148686868686612f86565b6001600160a01b03841661299c57604051632bfa23e760e11b81525f60048201526024016111c2565b60408051600180825260208201869052818301908152606082018590526080820190925290610f145f87848487612fe0565b60025483106129f05760405163c1ab6dc160e01b815260040160405180910390fd5b5f8381526004602052604090206003810154612a139063ffffffff851690614573565b8514612a315760405162bfc92160e01b815260040160405180910390fd5b805463ffffffff1615801590612a685750805463ffffffff80821691612a60918691600160401b900416614ae2565b63ffffffff16115b15612a86576040516352df9fe560e01b815260040160405180910390fd5b5f8263ffffffff16118015612ae157505f8481526005602090815260408083206001600160a01b038a16845290915290205463ffffffff80841691612ad6918616906001600160401b0316614b2c565b6001600160401b0316115b15612aff57604051636c80554560e11b815260040160405180910390fd5b600281015463ffffffff1615801590612b215750600281015463ffffffff1642105b15612b3f5760405163914edb0f60e01b815260040160405180910390fd5b6002810154600160201b900463ffffffff1615801590612b6f57506002810154600160201b900463ffffffff1642115b15612b8d5760405163914edb0f60e01b815260040160405180910390fd5b8415612bbd5760048101548015612bb057612bab8683600401613033565b612bbb565b612bbb866009613033565b505b805483908290600890612bde908490600160401b900463ffffffff16614ae2565b82546101009290920a63ffffffff8181021990931691831602179091555f8681526005602090815260408083206001600160a01b038c16845290915281208054928716935091612c389084906001600160401b0316614b2c565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550612c7c86858563ffffffff1660405180602001604052805f815250612973565b6040805185815263ffffffff851660208201526001600160a01b038816917f2e8ac5177a616f2aec08c3048f5021e4e9743ece034e8d83ba5caf76688bb475910160405180910390a2505050505050565b5f82612cd985846130e1565b14949350505050565b5f80516020614c358339815191527f88be536d5240c274a3b1d3a1be54482fd9caa294f08c62a7cde569f49a3c45026119a6838261488c565b610da633838361311b565b6001600160a01b038316612d4e57604051626a0d4560e21b81525f60048201526024016111c2565b604080516001808252602082018590528183019081526060820184905260a082019092525f60808201818152919291612d8c91879185908590612fe0565b5050505050565b7fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b006127106001600160601b038316811015612dfa5760405163dfd1fc1b60e01b8152600481018690526001600160601b0384166024820152604481018290526064016111c2565b6001600160a01b038416612e2a57604051634b4f842960e11b8152600481018690525f60248201526044016111c2565b506040805180820182526001600160a01b0394851681526001600160601b0393841660208083019182525f9788526001909401909352942093519051909116600160a01b029116179055565b336001600160a01b0386168114801590612e975750612e9586826120d9565b155b15612ec85760405163711bec9160e11b81526001600160a01b038083166004830152871660248201526044016111c2565b610f1486868686866131c0565b5f6001600160e01b03198216636cdb3d1360e11b1480612f0557506001600160e01b031982166303a24d0760e21b145b8061082357506301ffc9a760e01b6001600160e01b0319831614610823565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661175f57604051631afcd79f60e31b815260040160405180910390fd5b612f75612f24565b6122c781612ce2565b612295612f24565b6001600160a01b038416612faf57604051632bfa23e760e11b81525f60048201526024016111c2565b6001600160a01b038516612fd757604051626a0d4560e21b81525f60048201526024016111c2565b612d8c85858585855b612fec8585858561324c565b6001600160a01b03841615612d8c5782513390600103613025576020848101519084015161301e8389898585896133b0565b5050610f14565b610f148187878787876134d1565b80545f5b8181101561166a575f835f018281548110613054576130546144ad565b5f9182526020822001546001860180546001600160a01b03909216935060649185908110613084576130846144ad565b905f5260205f200154876130989190614573565b6130a29190614972565b6001600160a01b0383165f908152600660205260408120805492935083929091906130ce90849061495f565b9091555050600190920191506130379050565b5f81815b845181101561125c5761311182868381518110613104576131046144ad565b60200260200101516135b8565b91506001016130e5565b5f80516020614c358339815191526001600160a01b0383166131515760405162ced3e160e81b81525f60048201526024016111c2565b6001600160a01b038481165f818152600184016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b6001600160a01b0384166131e957604051632bfa23e760e11b81525f60048201526024016111c2565b6001600160a01b03851661321157604051626a0d4560e21b81525f60048201526024016111c2565b604080516001808252602082018690528183019081526060820185905260808201909252906132438787848487612fe0565b50505050505050565b7f4a593662ee04d27b6a00ebb31be7fe0c102c2ade82a7c5d764f2df05dc4e2800613279858585856135e7565b6001600160a01b038516613320575f805b8451811015613305575f8482815181106132a6576132a66144ad565b6020026020010151905080845f015f8885815181106132c7576132c76144ad565b602002602001015181526020019081526020015f205f8282546132ea919061495f565b909155506132fa9050818461495f565b92505060010161328a565b5080826001015f828254613319919061495f565b9091555050505b6001600160a01b038416612d8c575f805b845181101561339c575f84828151811061334d5761334d6144ad565b6020026020010151905080845f015f88858151811061336e5761336e6144ad565b60209081029190910181015182528101919091526040015f2080549190910390559190910190600101613331565b506001820180549190910390555050505050565b6001600160a01b0384163b15610f145760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906133f49089908990889088908890600401614b4b565b6020604051808303815f875af192505050801561342e575060408051601f3d908101601f1916820190925261342b91810190614b8f565b60015b613495573d80801561345b576040519150601f19603f3d011682016040523d82523d5f602084013e613460565b606091505b5080515f0361348d57604051632bfa23e760e11b81526001600160a01b03861660048201526024016111c2565b805181602001fd5b6001600160e01b0319811663f23a6e6160e01b1461324357604051632bfa23e760e11b81526001600160a01b03861660048201526024016111c2565b6001600160a01b0384163b15610f145760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906135159089908990889088908890600401614baa565b6020604051808303815f875af192505050801561354f575060408051601f3d908101601f1916820190925261354c91810190614b8f565b60015b61357c573d80801561345b576040519150601f19603f3d011682016040523d82523d5f602084013e613460565b6001600160e01b0319811663bc197c8160e01b1461324357604051632bfa23e760e11b81526001600160a01b03861660048201526024016111c2565b5f8183106135d2575f8281526020849052604090206135e0565b5f8381526020839052604090205b9392505050565b805182515f80516020614c3583398151915291146136255782518251604051635b05999160e01b8152600481019290925260248201526044016111c2565b335f5b8451811015613727576020818102868101820151908601909101516001600160a01b038916156136d9575f828152602086815260408083206001600160a01b038d168452909152902054818110156136b3576040516303dee4c560e01b81526001600160a01b038b1660048201526024810182905260448101839052606481018490526084016111c2565b5f838152602087815260408083206001600160a01b038e16845290915290209082900390555b6001600160a01b0388161561371d575f828152602086815260408083206001600160a01b038c1684529091528120805483929061371790849061495f565b90915550505b5050600101613628565b5083516001036137a75760208401515f906020850151909150866001600160a01b0316886001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051613798929190918252602082015260400190565b60405180910390a45050610f14565b846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516137f6929190614c07565b60405180910390a4505050505050565b828054828255905f5260205f20908101928215613859579160200282015b8281111561385957825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613824565b50613865929150613913565b5090565b828054828255905f5260205f20908101928215613859579160200282015b82811115613859578251825591602001919060010190613887565b60405180604001604052806138b56138c1565b81526020015f81525090565b60408051610100810182525f808252602080830182905282840182905260608084018390526080840183905260a0840183905260c084019290925283518085019094528184528301529060e082015290565b5b80821115613865575f8155600101613914565b6001600160a01b03811681146122c7575f80fd5b803561394681613927565b919050565b5f806040838503121561395c575f80fd5b823561396781613927565b946020939093013593505050565b6001600160e01b0319811681146122c7575f80fd5b5f6020828403121561399a575f80fd5b81356135e081613975565b80356001600160601b0381168114613946575f80fd5b5f80604083850312156139cc575f80fd5b82356139d781613927565b91506139e5602084016139a5565b90509250929050565b634e487b7160e01b5f52604160045260245ffd5b60405161010081016001600160401b0381118282101715613a2557613a256139ee565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613a5357613a536139ee565b604052919050565b5f82601f830112613a6a575f80fd5b8135602083015f806001600160401b03841115613a8957613a896139ee565b50601f8301601f1916602001613a9e81613a2b565b915050828152858383011115613ab2575f80fd5b828260208301375f92810160200192909252509392505050565b5f8083601f840112613adc575f80fd5b5081356001600160401b03811115613af2575f80fd5b6020830191508360208260051b8501011115610ee6575f80fd5b5f60408284031215613b1c575f80fd5b50919050565b80151581146122c7575f80fd5b803561394681613b22565b5f805f805f805f805f806101408b8d031215613b54575f80fd5b8a356001600160401b03811115613b69575f80fd5b613b758d828e01613a5b565b9a505060208b01356001600160401b03811115613b90575f80fd5b613b9c8d828e01613a5b565b99505060408b01356001600160401b03811115613bb7575f80fd5b613bc38d828e01613a5b565b98505060608b01356001600160401b03811115613bde575f80fd5b613bea8d828e01613acc565b9098509650613bfe90508c60808d01613b0c565b945060c08b01356001600160401b03811115613c18575f80fd5b613c248d828e01613b0c565b945050613c3360e08c01613b2f565b9250613c426101008c0161393b565b9150613c516101208c0161393b565b90509295989b9194979a5092959850565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6135e06020830184613c62565b5f60208284031215613cb2575f80fd5b5035919050565b5f60208284031215613cc9575f80fd5b81356135e081613927565b5f8060408385031215613ce5575f80fd5b50508035926020909101359150565b5f6001600160401b03821115613d0c57613d0c6139ee565b5060051b60200190565b5f82601f830112613d25575f80fd5b8135613d38613d3382613cf4565b613a2b565b8082825260208201915060208360051b860101925085831115613d59575f80fd5b602085015b83811015613d76578035835260209283019201613d5e565b5095945050505050565b5f805f805f60a08688031215613d94575f80fd5b8535613d9f81613927565b94506020860135613daf81613927565b935060408601356001600160401b03811115613dc9575f80fd5b613dd588828901613d16565b93505060608601356001600160401b03811115613df0575f80fd5b613dfc88828901613d16565b92505060808601356001600160401b03811115613e17575f80fd5b613e2388828901613a5b565b9150509295509295909350565b5f8060208385031215613e41575f80fd5b82356001600160401b03811115613e56575f80fd5b613e6285828601613acc565b90969095509350505050565b5f8151808452602084019350602083015f5b82811015613e9e578151865260209586019590910190600101613e80565b5093949350505050565b8051604080845281519084018190525f9160200190829060608601905b80831015613ef05783516001600160a01b031682526020938401936001939093019290910190613ec5565b50602085015192508581036020870152613f0a8184613e6e565b9695505050505050565b602081525f6135e06020830184613ea8565b5f82601f830112613f35575f80fd5b8135613f43613d3382613cf4565b8082825260208201915060208360051b860101925085831115613f64575f80fd5b602085015b83811015613d76578035613f7c81613927565b835260209283019201613f69565b5f8060408385031215613f9b575f80fd5b82356001600160401b03811115613fb0575f80fd5b613fbc85828601613f26565b92505060208301356001600160401b03811115613fd7575f80fd5b613fe385828601613d16565b9150509250929050565b602081525f6135e06020830184613e6e565b5f6101008284031215613b1c575f80fd5b5f60208284031215614020575f80fd5b81356001600160401b03811115614035575f80fd5b61404184828501613fff565b949350505050565b5f805f805f6060868803121561405d575f80fd5b8535945060208601356001600160401b03811115614079575f80fd5b61408588828901613acc565b90955093505060408601356001600160401b038111156140a3575f80fd5b6140af88828901613acc565b969995985093965092949392505050565b63ffffffff811681146122c7575f80fd5b8035613946816140c0565b5f805f606084860312156140ee575f80fd5b83356140f981613927565b9250602084013591506040840135614110816140c0565b809150509250925092565b5f805f805f6080868803121561412f575f80fd5b853594506020860135614141816140c0565b93506040860135614151816140c0565b925060608601356001600160401b038111156140a3575f80fd5b5f6020828403121561417b575f80fd5b81356001600160401b03811115614190575f80fd5b61404184828501613b0c565b5f80604083850312156141ad575f80fd5b8235915060208301356141bf816140c0565b809150509250929050565b5f80602083850312156141db575f80fd5b82356001600160401b038111156141f0575f80fd5b8301601f81018513614200575f80fd5b80356001600160401b03811115614215575f80fd5b856020828401011115614226575f80fd5b6020919091019590945092505050565b63ffffffff815116825263ffffffff60208201511660208301525f6040820151614268604085018263ffffffff169052565b5060608201516060840152608082015161428a608085018263ffffffff169052565b5060a08201516142a260a085018263ffffffff169052565b5060c082015160c084015260e082015161010060e0850152614041610100850182613ea8565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561433357603f1987860301845281518051604087526143146040880182614236565b60209283015197830197909752509384019391909101906001016142ee565b50929695505050505050565b5f8060408385031215614350575f80fd5b823561435b81613927565b915060208301356141bf81613b22565b5f806040838503121561437c575f80fd5b8235915060208301356001600160401b03811115614398575f80fd5b613fe385828601613b0c565b5f805f606084860312156143b6575f80fd5b8335925060208401356143c881613927565b91506143d6604085016139a5565b90509250925092565b5f80604083850312156143f0575f80fd5b8235915060208301356001600160401b0381111561440c575f80fd5b613fe385828601613fff565b5f8060408385031215614429575f80fd5b823561443481613927565b915060208301356141bf81613927565b602081525f6135e06020830184614236565b5f805f805f60a0868803121561446a575f80fd5b853561447581613927565b9450602086013561448581613927565b9350604086013592506060860135915060808601356001600160401b03811115613e17575f80fd5b634e487b7160e01b5f52603260045260245ffd5b5f823560fe198336030181126144d5575f80fd5b9190910192915050565b5f8235603e198336030181126144d5575f80fd5b5f808335601e19843603018112614508575f80fd5b8301803591506001600160401b03821115614521575f80fd5b6020019150600581901b3603821315610ee6575f80fd5b5f60208284031215614548575f80fd5b81356135e0816140c0565b5f8135610823816140c0565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176108235761082361455f565b5b81811015610da6575f815560010161458b565b818310156119a657805f5260205f2061166a83820185830161458a565b6145c582836144f3565b6001600160401b038111156145dc576145dc6139ee565b600160401b8111156145f0576145f06139ee565b825481845561460082828661459e565b50825f5260205f205f5b8281101561463057833561461d81613927565b828201556020939093019260010161460a565b505050506001810161464560208401846144f3565b6001600160401b0381111561465c5761465c6139ee565b600160401b811115614670576146706139ee565b825481845561468082828661459e565b505f92835260208320925b81811015610f145782358482015560209092019160010161468b565b6146b182836144f3565b6001600160401b038111156146c8576146c86139ee565b600160401b8111156146dc576146dc6139ee565b82548184556146ec82828661459e565b50825f5260205f205f5b8281101561463057833561470981613927565b82820155602093909301926001016146f6565b8135614727816140c0565b815463ffffffff191663ffffffff8216178255506020820135614749816140c0565b815467ffffffff000000001916602082901b67ffffffff0000000016178255506040820135614777816140c0565b815463ffffffff60401b191660409190911b6bffffffff00000000000000001617815560608201356001820155600281016147ce6147b760808501614553565b825463ffffffff191663ffffffff91909116178255565b6147ff6147dd60a08501614553565b825467ffffffff00000000191660209190911b67ffffffff0000000016178255565b5060c08201356003820155610da661481a60e08401846144df565b600483016145bb565b600181811c9082168061483757607f821691505b602082108103613b1c57634e487b7160e01b5f52602260045260245ffd5b601f8211156119a657805f5260205f20601f840160051c8101602085101561487a5750805b612d8c601f850160051c83018261458a565b81516001600160401b038111156148a5576148a56139ee565b6148b9816148b38454614823565b84614855565b6020601f8211600181146148eb575f83156148d45750848201515b5f19600385901b1c1916600184901b178455612d8c565b5f84815260208120601f198516915b8281101561491a57878501518255602094850194600190920191016148fa565b508482101561493757868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f60208284031215614956575f80fd5b6135e0826139a5565b808201808211156108235761082361455f565b5f8261498c57634e487b7160e01b5f52601260045260245ffd5b500490565b5f604082840312156149a1575f80fd5b604080519081016001600160401b03811182821017156149c3576149c36139ee565b60405290508082356001600160401b038111156149de575f80fd5b6149ea85828601613f26565b82525060208301356001600160401b03811115614a05575f80fd5b614a1185828601613d16565b6020830152505092915050565b5f6101008236031215614a2f575f80fd5b614a37613a02565b614a40836140d1565b8152614a4e602084016140d1565b6020820152614a5f604084016140d1565b604082015260608381013590820152614a7a608084016140d1565b6080820152614a8b60a084016140d1565b60a082015260c0838101359082015260e08301356001600160401b03811115614ab2575f80fd5b614abe36828601614991565b60e08301525092915050565b5f60018201614adb57614adb61455f565b5060010190565b63ffffffff81811683821601908111156108235761082361455f565b818103818111156108235761082361455f565b5f60208284031215614b21575f80fd5b81516135e081613b22565b6001600160401b0381811683821601908111156108235761082361455f565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f90614b8490830184613c62565b979650505050505050565b5f60208284031215614b9f575f80fd5b81516135e081613975565b6001600160a01b0386811682528516602082015260a0604082018190525f90614bd590830186613e6e565b8281036060840152614be78186613e6e565b90508281036080840152614bfb8185613c62565b98975050505050505050565b604081525f614c196040830185613e6e565b8281036020840152614c2b8185613e6e565b9594505050505056fe88be536d5240c274a3b1d3a1be54482fd9caa294f08c62a7cde569f49a3c4500a2646970667358221220f69cb89b0b3638e13d5156b38caff43ec1bd8ff7fe78b0550052a78bea6910f864736f6c634300081a0033

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