false
true
0

Contract Address Details

0xe8644d3aeaEE677847a983f108221aE858283f19

Contract Name
PlaygroundGateway
Creator
0x35d360–f01292 at 0xc25ec4–4584b0
Balance
147,000 PLS ( )
Tokens
Fetching tokens...
Transactions
433 Transactions
Transfers
0 Transfers
Gas Used
95,479,393
Last Balance Update
25896934
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
PlaygroundGateway




Optimization enabled
false
Compiler version
v0.8.20+commit.a1b79de6




EVM Version
shanghai




Verified at
2026-02-27T17:33:42.003757Z

Constructor Arguments

00000000000000000000000035d360d7d53cc96df768fd2dec2eefa4c2f01292

Arg [0] (address) : 0x35d360d7d53cc96df768fd2dec2eefa4c2f01292

              

contracts/PlaygroundGateway.sol

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

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "./PlaygroundFactory.sol";
import "./PlaygroundToken.sol";

/**
 * @title IPlaygroundDistributor
 * @dev Interface for PlaygroundDistributor contract
 */
interface IPlaygroundDistributor {
    struct Campaign {
        address depositor;
        address pairAddress;
        uint256 totalAmount;
        uint256 startTime;
        uint256 endTime;
        uint256 duration;
    }

    function getTotalCampaigns() external view returns (uint256);

    function getCampaignDetails(
        uint256 campaignId
    ) external view returns (Campaign memory);

    function createDistribution(
        uint256 amount,
        address pairAddress,
        uint256 durationDays
    ) external returns (uint256);

    function getVestedAmount(
        uint256 campaignId
    ) external view returns (uint256);
}

/**
 * @title IRouter
 * @dev Interface for PulseXRouter (Uniswap V2 style)
 */
interface IRouter {
    function swapExactETHForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function getAmountsOut(
        uint256 amountIn,
        address[] calldata path
    ) external view returns (uint256[] memory amounts);
}

/**
 * @title PlaygroundGateway
 * @dev Gateway contract that wraps PlaygroundFactory operations with PLS fee collection
 * @notice Collects PLS fees for token creation, burn, and claim operations
 */
contract PlaygroundGateway is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    /// @dev PlaygroundFactory contract reference
    PlaygroundFactory public constant factory =
        PlaygroundFactory(0xABef2874C5Ef165fc2194c180e06894871724b05);

    /// @dev Mandala token contract reference
    IERC20 public constant mandalaToken =
        IERC20(0x3a6c545c9E07e6d3041DC802033400F7fBf96c9a);

    /// @dev Base fee in PLS (wei) - default 10000 ether
    uint256 public baseFee;

    /// @dev Fixed fee for burn/claim operations (1000 PLS)
    uint256 public constant BURN_CLAIM_FEE = 1000 ether;

    /// @dev Dev wallet address (immutable)
    address public immutable devWallet;

    /// @dev Distribution threshold in PLS (wei) - default 2M PLS
    uint256 public distributionThreshold;

    /// @dev PlaygroundDistributor contract reference
    IPlaygroundDistributor public constant distributor =
        IPlaygroundDistributor(0x3Ba90C5a1840dedFDb9838fF4025df240d84A637);

    /// @dev MDALA token contract reference (same as mandalaToken)
    IERC20 public constant mdalaToken =
        IERC20(0x3a6c545c9E07e6d3041DC802033400F7fBf96c9a);

    /// @dev Wrapped PLS address
    address public constant wpls = 0xA1077a294dDE1B09bB078844df40758a5D0f9a27;

    /// @dev PulseXRouter address for swaps
    IRouter public constant router =
        IRouter(0x165C3410fC91EF562C50559f7d2289fEbed552d9);

    /**
     * @dev Event emitted when a token creation is routed through gateway
     * @param token Address of the newly created token
     * @param creator Address that created the token
     * @param feeAmount PLS fee collected
     * @param level Tree level (distance from deepest leaf)
     * @param nodesAtLevel Number of nodes at this level
     */
    event TokenCreationRouted(
        address indexed token,
        address indexed creator,
        uint256 feeAmount,
        uint256 level,
        uint256 nodesAtLevel
    );

    /**
     * @dev Event emitted when a burn operation is routed through gateway
     * @param token Token address
     * @param user User performing burn
     * @param feeAmount PLS fee collected
     */
    event BurnRouted(
        address indexed token,
        address indexed user,
        uint256 feeAmount
    );

    /**
     * @dev Event emitted when a claim operation is routed through gateway
     * @param token Token address
     * @param user User performing claim
     * @param feeAmount PLS fee collected
     */
    event ClaimRouted(
        address indexed token,
        address indexed user,
        uint256 feeAmount
    );

    /**
     * @dev Event emitted when base fee is updated
     * @param oldFee Previous base fee
     * @param newFee New base fee
     */
    event BaseFeeUpdated(uint256 oldFee, uint256 newFee);

    /**
     * @dev Event emitted when fees are withdrawn
     * @param recipient Recipient address
     * @param amount Amount withdrawn
     */
    event FeesWithdrawn(address indexed recipient, uint256 amount);

    /**
     * @dev Event emitted when auto-distribution is triggered
     * @param totalFees Total fees collected
     * @param devAmount Amount sent to dev wallet
     * @param distributedAmount Amount distributed to campaigns
     * @param campaignCount Number of campaigns created
     */
    event AutoDistributionTriggered(
        uint256 totalFees,
        uint256 devAmount,
        uint256 distributedAmount,
        uint256 campaignCount
    );

    /**
     * @dev Event emitted when distribution threshold is updated
     * @param oldThreshold Previous threshold
     * @param newThreshold New threshold
     */
    event DistributionThresholdUpdated(
        uint256 oldThreshold,
        uint256 newThreshold
    );

    /**
     * @dev Constructor
     * @param initialOwner Address of the initial owner
     */
    constructor(address initialOwner) Ownable(initialOwner) {
        require(
            initialOwner != address(0),
            "PlaygroundGateway: Owner cannot be zero address"
        );

        baseFee = 10000 ether; // Default 10,000 PLS
        devWallet = 0x35D360D7d53Cc96DF768fD2Dec2eEFA4C2f01292;
        distributionThreshold = 2_000_000 ether; // Default 2M PLS
    }

    /**
     * @dev Calculate fee for token creation
     * @param level Tree level (distance from deepest leaf)
     * @param nodesAtLevel Number of nodes at this level
     * @return Fee amount in PLS (wei)
     */
    function calculateCreateFee(
        uint256 level,
        uint256 nodesAtLevel
    ) public view returns (uint256) {
        // Formula: (baseFee * level) + ((baseFee / 10) * nodesAtLevel) + (baseFee / 10)
        return
            (baseFee * level) +
            ((baseFee / 10) * nodesAtLevel) +
            (baseFee / 10);
    }

    /**
     * @dev Create a new PlaygroundToken through the gateway
     * @param amount Amount of Mandala tokens to pay
     * @param parent Parent token address
     * @param name ERC20 token name
     * @param symbol ERC20 token symbol
     * @param description Token description
     * @param maxSupply Maximum supply cap
     * @param level Tree level (distance from deepest leaf)
     * @param nodesAtLevel Number of nodes at this level
     * @return tokenAddress Address of the newly created token
     */
    function createToken(
        uint256 amount,
        address parent,
        string memory name,
        string memory symbol,
        string memory description,
        uint256 maxSupply,
        uint256 level,
        uint256 nodesAtLevel
    ) external payable returns (address tokenAddress) {
        // Calculate and validate fee
        uint256 requiredFee = calculateCreateFee(level, nodesAtLevel);
        require(
            msg.value >= requiredFee,
            "PlaygroundGateway: Insufficient PLS fee"
        );

        // Transfer Mandala tokens from user to this contract
        mandalaToken.safeTransferFrom(msg.sender, address(this), amount);

        // Approve factory to spend Mandala tokens
        mandalaToken.approve(address(factory), amount);

        // Call factory to create token
        tokenAddress = factory.create(
            amount,
            parent,
            name,
            symbol,
            description,
            maxSupply
        );

        // Transfer minted tokens to user
        IERC20(tokenAddress).safeTransfer(msg.sender, amount);

        // Emit event
        emit TokenCreationRouted(
            tokenAddress,
            msg.sender,
            requiredFee,
            level,
            nodesAtLevel
        );

        // Refund excess PLS if any
        if (msg.value > requiredFee) {
            (bool success, ) = payable(msg.sender).call{
                value: msg.value - requiredFee
            }("");
            require(success, "PlaygroundGateway: PLS refund failed");
        }

        // Check threshold and trigger auto-distribution if needed
        _checkAndDistribute();

        return tokenAddress;
    }

    /**
     * @dev Burn tokens through the gateway (wrap parent tokens into child tokens)
     * @param token Child token address
     * @param amount Amount to burn (wrap)
     */
    function burn(address token, uint256 amount) external payable {
        require(
            msg.value >= BURN_CLAIM_FEE,
            "PlaygroundGateway: Insufficient PLS fee for burn"
        );

        // Get parent token address from child token
        address parentToken = PlaygroundToken(token).parent();

        // Transfer parent tokens from user to this contract
        IERC20(parentToken).safeTransferFrom(msg.sender, address(this), amount);

        // Approve child token to spend parent tokens
        IERC20(parentToken).approve(token, amount);

        // Call burn on PlaygroundToken (wraps parent tokens, mints child tokens to gateway)
        PlaygroundToken(token).burn(amount);

        // Transfer minted child tokens to user
        IERC20(token).safeTransfer(msg.sender, amount);

        // Emit event
        emit BurnRouted(token, msg.sender, BURN_CLAIM_FEE);

        // Refund excess PLS if any
        if (msg.value > BURN_CLAIM_FEE) {
            (bool success, ) = payable(msg.sender).call{
                value: msg.value - BURN_CLAIM_FEE
            }("");
            require(success, "PlaygroundGateway: PLS refund failed");
        }

        // Check threshold and trigger auto-distribution if needed
        _checkAndDistribute();
    }

    /**
     * @dev Claim tokens through the gateway (unwrap child tokens into parent tokens)
     * @param token Child token address to claim from
     * @param amount Amount to claim (unwrap)
     */
    function claim(address token, uint256 amount) external payable {
        require(
            msg.value >= BURN_CLAIM_FEE,
            "PlaygroundGateway: Insufficient PLS fee for claim"
        );

        // Transfer child tokens from user to this contract
        IERC20(token).safeTransferFrom(msg.sender, address(this), amount);

        // Call claim on PlaygroundToken (burns child tokens, sends parent tokens to gateway)
        PlaygroundToken(token).claim(amount);

        // Get parent token address
        address parentToken = PlaygroundToken(token).parent();

        // Transfer parent tokens to user
        IERC20(parentToken).safeTransfer(msg.sender, amount);

        // Emit event
        emit ClaimRouted(token, msg.sender, BURN_CLAIM_FEE);

        // Refund excess PLS if any
        if (msg.value > BURN_CLAIM_FEE) {
            (bool success, ) = payable(msg.sender).call{
                value: msg.value - BURN_CLAIM_FEE
            }("");
            require(success, "PlaygroundGateway: PLS refund failed");
        }

        // Check threshold and trigger auto-distribution if needed
        _checkAndDistribute();
    }

    /**
     * @dev Set base fee (owner only)
     * @param newBaseFee New base fee in PLS (wei)
     */
    function setBaseFee(uint256 newBaseFee) external onlyOwner {
        uint256 oldFee = baseFee;
        baseFee = newBaseFee;
        emit BaseFeeUpdated(oldFee, newBaseFee);
    }

    /**
     * @dev Get current base fee
     * @return Current base fee in PLS (wei)
     */
    function getBaseFee() external view returns (uint256) {
        return baseFee;
    }

    /**
     * @dev Set distribution threshold (owner only)
     * @param newThreshold New threshold in PLS (wei)
     */
    function setDistributionThreshold(uint256 newThreshold) external onlyOwner {
        uint256 oldThreshold = distributionThreshold;
        distributionThreshold = newThreshold;
        emit DistributionThresholdUpdated(oldThreshold, newThreshold);
    }

    /**
     * @dev Struct to hold campaign information for sorting
     * @param campaignId Campaign ID
     * @param pairAddress LP token pair address
     * @param totalAmount Remaining unvested amount (not yet released by vesting schedule)
     */
    struct CampaignInfo {
        uint256 campaignId;
        address pairAddress;
        uint256 totalAmount;
    }

    /**
     * @dev Get top active campaigns sorted by remaining unvested amount
     * @param count Number of top campaigns to return
     * @return Array of CampaignInfo structs with remaining unvested amounts
     */
    function _getTopActiveCampaigns(
        uint256 count
    ) internal view returns (CampaignInfo[] memory) {
        uint256 totalCampaigns = distributor.getTotalCampaigns();
        if (totalCampaigns == 0) {
            return new CampaignInfo[](0);
        }

        // Collect all active campaigns
        CampaignInfo[] memory activeCampaigns = new CampaignInfo[](
            totalCampaigns
        );
        uint256 activeCount = 0;
        uint256 currentTime = block.timestamp;

        for (uint256 i = 0; i < totalCampaigns; i++) {
            IPlaygroundDistributor.Campaign memory campaign = distributor
                .getCampaignDetails(i);
            // Check if campaign is active (endTime > currentTime)
            if (campaign.endTime > currentTime && campaign.totalAmount > 0) {
                // Calculate remaining unvested amount
                uint256 vestedAmount = distributor.getVestedAmount(i);
                uint256 remainingAmount = campaign.totalAmount - vestedAmount;

                // Only include campaigns with unvested tokens
                if (remainingAmount > 0) {
                    activeCampaigns[activeCount] = CampaignInfo({
                        campaignId: i,
                        pairAddress: campaign.pairAddress,
                        totalAmount: remainingAmount
                    });
                    activeCount++;
                }
            }
        }

        if (activeCount == 0) {
            return new CampaignInfo[](0);
        }

        // Resize array to actual active count
        CampaignInfo[] memory resized = new CampaignInfo[](activeCount);
        for (uint256 i = 0; i < activeCount; i++) {
            resized[i] = activeCampaigns[i];
        }

        // Sort by remaining unvested amount descending (bubble sort for simplicity)
        for (uint256 i = 0; i < resized.length; i++) {
            for (uint256 j = 0; j < resized.length - i - 1; j++) {
                if (resized[j].totalAmount < resized[j + 1].totalAmount) {
                    CampaignInfo memory temp = resized[j];
                    resized[j] = resized[j + 1];
                    resized[j + 1] = temp;
                }
            }
        }

        // Return top count campaigns
        uint256 returnCount = count < resized.length ? count : resized.length;
        CampaignInfo[] memory topCampaigns = new CampaignInfo[](returnCount);
        for (uint256 i = 0; i < returnCount; i++) {
            topCampaigns[i] = resized[i];
        }

        return topCampaigns;
    }

    /**
     * @dev Swap PLS for MDALA tokens using PulseXRouter
     * @param plsAmount Amount of PLS to swap
     * @return mdalaAmount Amount of MDALA tokens received
     */
    function _swapPLSForMDALA(
        uint256 plsAmount
    ) internal returns (uint256 mdalaAmount) {
        require(plsAmount > 0, "PlaygroundGateway: PLS amount must be > 0");

        // Calculate minimum output with 0.5% slippage tolerance
        address[] memory path = new address[](2);
        path[0] = wpls;
        path[1] = address(mdalaToken);

        uint256[] memory amountsOut = router.getAmountsOut(plsAmount, path);
        uint256 expectedMDALA = amountsOut[1];
        uint256 minMDALA = (expectedMDALA * 995) / 1000; // 0.5% slippage

        // Perform swap
        uint256[] memory amounts = router.swapExactETHForTokens{
            value: plsAmount
        }(minMDALA, path, address(this), block.timestamp + 300);

        return amounts[1];
    }

    /**
     * @dev Distribute MDALA tokens proportionally to top campaigns
     * @param totalMDALA Total MDALA amount to distribute
     * @param topCampaigns Array of top campaigns
     */
    function _distributeToCampaigns(
        uint256 totalMDALA,
        CampaignInfo[] memory topCampaigns
    ) internal {
        if (topCampaigns.length == 0 || totalMDALA == 0) {
            return;
        }

        // Calculate total amount across all campaigns for proportional split
        uint256 totalCampaignAmount = 0;
        for (uint256 i = 0; i < topCampaigns.length; i++) {
            totalCampaignAmount += topCampaigns[i].totalAmount;
        }

        if (totalCampaignAmount == 0) {
            return;
        }

        // Approve distributor to spend MDALA tokens
        // Reset allowance to 0 first, then set new allowance
        uint256 currentAllowance = mdalaToken.allowance(
            address(this),
            address(distributor)
        );
        if (currentAllowance > 0) {
            SafeERC20.safeDecreaseAllowance(
                mdalaToken,
                address(distributor),
                currentAllowance
            );
        }
        SafeERC20.safeIncreaseAllowance(
            mdalaToken,
            address(distributor),
            totalMDALA
        );

        // Distribute proportionally to each campaign
        for (uint256 i = 0; i < topCampaigns.length; i++) {
            // Calculate proportional share
            uint256 proportionalShare = (totalMDALA *
                topCampaigns[i].totalAmount) / totalCampaignAmount;

            if (proportionalShare > 0) {
                // Create new 7-day distribution campaign
                distributor.createDistribution(
                    proportionalShare,
                    topCampaigns[i].pairAddress,
                    7 // 7 days duration
                );
            }
        }
    }

    /**
     * @dev Check if threshold is reached and trigger auto-distribution
     */
    function _checkAndDistribute() internal nonReentrant {
        uint256 balance = address(this).balance;
        if (balance < distributionThreshold) {
            return;
        }

        // Calculate 10% for dev wallet
        uint256 devAmount = (balance * 10) / 100;
        uint256 remainingAmount = balance - devAmount;

        // Send 10% to dev wallet
        if (devAmount > 0) {
            (bool success, ) = payable(devWallet).call{value: devAmount}("");
            require(success, "PlaygroundGateway: Dev wallet transfer failed");
        }

        // Get top 5 active campaigns
        CampaignInfo[] memory topCampaigns = _getTopActiveCampaigns(5);

        uint256 distributedAmount = 0;
        uint256 campaignCount = 0;

        if (topCampaigns.length > 0 && remainingAmount > 0) {
            // Swap PLS to MDALA
            uint256 mdalaAmount = _swapPLSForMDALA(remainingAmount);

            if (mdalaAmount > 0) {
                // Distribute MDALA to campaigns
                _distributeToCampaigns(mdalaAmount, topCampaigns);
                distributedAmount = mdalaAmount;
                campaignCount = topCampaigns.length;
            }
        }

        emit AutoDistributionTriggered(
            balance,
            devAmount,
            distributedAmount,
            campaignCount
        );
    }

    /**
     * @dev Withdraw collected PLS fees (owner only)
     * @param recipient Address to receive fees
     */
    function withdrawFees(address payable recipient) external onlyOwner {
        require(
            recipient != address(0),
            "PlaygroundGateway: Recipient cannot be zero address"
        );

        uint256 balance = address(this).balance;
        require(balance > 0, "PlaygroundGateway: No fees to withdraw");

        emit FeesWithdrawn(recipient, balance);

        (bool success, ) = recipient.call{value: balance}("");
        require(success, "PlaygroundGateway: Fee withdrawal failed");
    }

    /**
     * @dev Receive function to accept PLS
     */
    receive() external payable {}
}
        

/IERC165.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)

pragma solidity >=0.4.16;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * 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[ERC 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);
}
          

/

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)

pragma solidity >=0.4.16;

import {IERC20} from "../token/ERC20/IERC20.sol";
          

/

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)

pragma solidity >=0.4.16;

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

/extensions/IERC20Metadata.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity >=0.6.2;

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

/**
 * @dev Interface for the optional metadata functions from the ERC-20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}
          

/

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC6093.sol)
pragma solidity >=0.8.4;

/**
 * @dev Standard ERC-20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 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 ERC-721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-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 ERC-1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 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);
}
          

/

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}
          

/

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)

pragma solidity >=0.6.2;

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

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}
          

/ERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC-20
 * applications.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

    mapping(address account => mapping(address spender => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * Both values are immutable: they can only be set once during construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return 18;
    }

    /// @inheritdoc IERC20
    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    /// @inheritdoc IERC20
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `value`.
     */
    function transfer(address to, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, value);
        return true;
    }

    /// @inheritdoc IERC20
    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Skips emitting an {Approval} event indicating an allowance update. This is not
     * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     *
     * ```solidity
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner`'s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance < type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}
          

/

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

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

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

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

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

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

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

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

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

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

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

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

/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)

pragma solidity >=0.4.16;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}
          

/utils/SafeERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}
          

/

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}
          

/

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

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./PlaygroundToken.sol";

/**
 * @title PlaygroundFactory
 * @dev Factory contract for creating PlaygroundToken instances
 * @notice Users pay Mandala tokens to create new PlaygroundToken instances
 */
contract PlaygroundFactory {
    using SafeERC20 for IERC20;

    /// @dev Dead address for burning tokens
    address private constant DEAD_ADDRESS =
        0x000000000000000000000000000000000000dEaD;

    /// @dev Mandala token address (immutable)
    IERC20 public immutable mandalaToken;

    /// @dev Array of all created PlaygroundToken addresses
    address[] public allTokens;

    /**
     * @dev Event emitted when a new PlaygroundToken is created
     * @param token Address of the newly created token
     * @param creator Address that created the token
     * @param amount Initial amount of PlaygroundTokens minted
     * @param parent Parent token address
     * @param maxSupply Maximum supply of the token
     */
    event TokenCreated(
        address indexed token,
        address indexed creator,
        uint256 amount,
        address parent,
        uint256 maxSupply
    );

    /**
     * @dev Constructor
     * @param mandalaTokenAddress Address of the Mandala token contract
     */
    constructor(address mandalaTokenAddress) {
        require(
            mandalaTokenAddress != address(0),
            "PlaygroundFactory: Mandala token cannot be zero address"
        );
        mandalaToken = IERC20(mandalaTokenAddress);
    }

    /**
     * @dev Create a new PlaygroundToken instance
     * @param amount Amount of Mandala tokens to pay (and initial PlaygroundTokens to mint)
     * @param parent Parent token address for wrapping/unwrapping
     * @param name ERC20 token name
     * @param symbol ERC20 token symbol
     * @param description Token description
     * @param maxSupply Maximum supply cap (must be >= 1 billion tokens)
     * @return tokenAddress Address of the newly created PlaygroundToken
     */
    function create(
        uint256 amount,
        address parent,
        string memory name,
        string memory symbol,
        string memory description,
        uint256 maxSupply
    ) external returns (address tokenAddress) {
        require(
            amount > 0,
            "PlaygroundFactory: amount must be greater than zero"
        );
        require(
            parent != address(0),
            "PlaygroundFactory: parent cannot be zero address"
        );
        require(
            maxSupply >= 1_000_000_000 * 10 ** 18,
            "PlaygroundFactory: maxSupply must be at least 1 billion tokens"
        );
        require(
            amount <= maxSupply,
            "PlaygroundFactory: initial amount cannot exceed maxSupply"
        );

        // Transfer Mandala tokens from user to dead address (burn)
        // Check allowance first
        uint256 allowance = mandalaToken.allowance(msg.sender, address(this));
        require(
            allowance >= amount,
            "PlaygroundFactory: insufficient Mandala token allowance"
        );

        // Check balance
        uint256 balance = mandalaToken.balanceOf(msg.sender);
        require(
            balance >= amount,
            "PlaygroundFactory: insufficient Mandala token balance"
        );

        mandalaToken.safeTransferFrom(msg.sender, DEAD_ADDRESS, amount);

        // Deploy new PlaygroundToken instance
        PlaygroundToken newToken = new PlaygroundToken(
            name,
            symbol,
            address(this), // Factory address for minting access control
            parent,
            description,
            maxSupply
        );

        tokenAddress = address(newToken);

        // Mint initial supply to creator
        newToken.mint(msg.sender, amount);

        // Add token address to array
        allTokens.push(tokenAddress);

        // Emit event
        emit TokenCreated(tokenAddress, msg.sender, amount, parent, maxSupply);

        return tokenAddress;
    }

    /**
     * @dev Get the total number of created tokens
     * @return Total count of created PlaygroundTokens
     */
    function tokenCount() external view returns (uint256) {
        return allTokens.length;
    }
}
          

/

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

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/**
 * @title PlaygroundToken
 * @dev ERC20 token with wrap/unwrap functionality using parent tokens
 * @notice Users can wrap parent tokens to receive PlaygroundTokens (burn function)
 *         and unwrap PlaygroundTokens to get back parent tokens (claim function)
 */
contract PlaygroundToken is ERC20, Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    /// @dev Parent token address used for wrapping/unwrapping
    address public parent;

    /// @dev Token description
    string public description;

    /// @dev Maximum supply cap (immutable)
    uint256 public immutable maxSupply;

    /// @dev Factory address that can mint tokens (immutable)
    address public immutable factory;

    /**
     * @dev Constructor
     * @param name ERC20 token name
     * @param symbol ERC20 token symbol
     * @param factoryAddress Factory contract address (for minting access control)
     * @param parentToken Parent token address for wrapping/unwrapping
     * @param tokenDescription Token description
     * @param maxTokenSupply Maximum supply cap (must be >= 1 billion tokens)
     */
    constructor(
        string memory name,
        string memory symbol,
        address factoryAddress,
        address parentToken,
        string memory tokenDescription,
        uint256 maxTokenSupply
    ) ERC20(name, symbol) Ownable(msg.sender) {
        require(parentToken != address(0), "PlaygroundToken: parent token cannot be zero address");
        require(
            maxTokenSupply >= 1_000_000_000 * 10**18,
            "PlaygroundToken: maxSupply must be at least 1 billion tokens"
        );

        parent = parentToken;
        description = tokenDescription;
        maxSupply = maxTokenSupply;
        factory = factoryAddress;
    }

    /**
     * @dev Wrap parent tokens into PlaygroundTokens
     * @notice Transfers parent tokens from user and mints PlaygroundTokens
     * @param amount Amount of parent tokens to wrap
     */
    function burn(uint256 amount) external {
        require(amount > 0, "PlaygroundToken: amount must be greater than zero");

        // Transfer parent tokens from user to this contract
        IERC20(parent).safeTransferFrom(msg.sender, address(this), amount);

        // Check max supply constraint
        require(
            totalSupply() + amount <= maxSupply,
            "PlaygroundToken: would exceed max supply"
        );

        // Mint PlaygroundTokens to user
        _mint(msg.sender, amount);
    }

    /**
     * @dev Unwrap PlaygroundTokens back to parent tokens
     * @notice Burns PlaygroundTokens and transfers parent tokens to user
     * @param amount Amount of PlaygroundTokens to unwrap
     */
    function claim(uint256 amount) external nonReentrant {
        require(amount > 0, "PlaygroundToken: amount must be greater than zero");

        // Burn PlaygroundTokens from user
        _burn(msg.sender, amount);

        // Transfer parent tokens from contract to user
        IERC20(parent).safeTransfer(msg.sender, amount);
    }

    /**
     * @dev Mint tokens (only callable by factory)
     * @notice Used by factory during token creation and for future minting logic
     * @param to Address to mint tokens to
     * @param amount Amount of tokens to mint
     */
    function mint(address to, uint256 amount) external {
        require(msg.sender == factory, "PlaygroundToken: only factory can mint");
        require(amount > 0, "PlaygroundToken: amount must be greater than zero");
        require(
            totalSupply() + amount <= maxSupply,
            "PlaygroundToken: would exceed max supply"
        );

        _mint(to, amount);
    }
}

          

Compiler Settings

{"remappings":[],"optimizer":{"runs":200,"enabled":false},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"shanghai","compilationTarget":{"contracts/PlaygroundGateway.sol":"PlaygroundGateway"}}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"initialOwner","internalType":"address"}]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"error","name":"ReentrancyGuardReentrantCall","inputs":[]},{"type":"error","name":"SafeERC20FailedDecreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"currentAllowance","internalType":"uint256"},{"type":"uint256","name":"requestedDecrease","internalType":"uint256"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"type":"address","name":"token","internalType":"address"}]},{"type":"event","name":"AutoDistributionTriggered","inputs":[{"type":"uint256","name":"totalFees","internalType":"uint256","indexed":false},{"type":"uint256","name":"devAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"distributedAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"campaignCount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"BaseFeeUpdated","inputs":[{"type":"uint256","name":"oldFee","internalType":"uint256","indexed":false},{"type":"uint256","name":"newFee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"BurnRouted","inputs":[{"type":"address","name":"token","internalType":"address","indexed":true},{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"feeAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ClaimRouted","inputs":[{"type":"address","name":"token","internalType":"address","indexed":true},{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"feeAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"DistributionThresholdUpdated","inputs":[{"type":"uint256","name":"oldThreshold","internalType":"uint256","indexed":false},{"type":"uint256","name":"newThreshold","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"FeesWithdrawn","inputs":[{"type":"address","name":"recipient","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"TokenCreationRouted","inputs":[{"type":"address","name":"token","internalType":"address","indexed":true},{"type":"address","name":"creator","internalType":"address","indexed":true},{"type":"uint256","name":"feeAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"level","internalType":"uint256","indexed":false},{"type":"uint256","name":"nodesAtLevel","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"BURN_CLAIM_FEE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"baseFee","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"burn","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"calculateCreateFee","inputs":[{"type":"uint256","name":"level","internalType":"uint256"},{"type":"uint256","name":"nodesAtLevel","internalType":"uint256"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"claim","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"payable","outputs":[{"type":"address","name":"tokenAddress","internalType":"address"}],"name":"createToken","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"address","name":"parent","internalType":"address"},{"type":"string","name":"name","internalType":"string"},{"type":"string","name":"symbol","internalType":"string"},{"type":"string","name":"description","internalType":"string"},{"type":"uint256","name":"maxSupply","internalType":"uint256"},{"type":"uint256","name":"level","internalType":"uint256"},{"type":"uint256","name":"nodesAtLevel","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"devWallet","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"distributionThreshold","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IPlaygroundDistributor"}],"name":"distributor","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract PlaygroundFactory"}],"name":"factory","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getBaseFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"mandalaToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"mdalaToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IRouter"}],"name":"router","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBaseFee","inputs":[{"type":"uint256","name":"newBaseFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDistributionThreshold","inputs":[{"type":"uint256","name":"newThreshold","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawFees","inputs":[{"type":"address","name":"recipient","internalType":"address payable"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"wpls","inputs":[]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

0x60a060405234801562000010575f80fd5b5060405162003d4738038062003d478339818101604052810190620000369190620002cc565b805f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000aa575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620000a191906200030d565b60405180910390fd5b620000bb81620001a660201b60201c565b50600180819055505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160362000134576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200012b90620003ac565b60405180910390fd5b69021e19e0c9bab24000006002819055507335d360d7d53cc96df768fd2dec2eefa4c2f0129273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506a01a784379d99db4200000060038190555050620003cc565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000296826200026b565b9050919050565b620002a8816200028a565b8114620002b3575f80fd5b50565b5f81519050620002c6816200029d565b92915050565b5f60208284031215620002e457620002e362000267565b5b5f620002f384828501620002b6565b91505092915050565b62000307816200028a565b82525050565b5f602082019050620003225f830184620002fc565b92915050565b5f82825260208201905092915050565b7f506c617967726f756e64476174657761793a204f776e65722063616e6e6f74205f8201527f6265207a65726f20616464726573730000000000000000000000000000000000602082015250565b5f62000394602f8362000328565b9150620003a18262000338565b604082019050919050565b5f6020820190508181035f830152620003c58162000386565b9050919050565b60805161395b620003ec5f395f818161075001526114a1015261395b5ff3fe60806040526004361061012d575f3560e01c80638f1a4e50116100aa578063b62097081161006e578063b62097081461038c578063b9b4744a146103bc578063bfe10928146103e4578063c45a01551461040e578063f2fde38b14610438578063f887ea401461046057610134565b80638f1a4e50146102d65780638f396d5714610300578063927ef7fa1461032a5780639dc29fac14610354578063aad3ec961461037057610134565b806346860698116100f1578063468606981461021a5780636ef25c3a14610242578063715018a61461026c5780638da5cb5b146102825780638ea5220f146102ac57610134565b806315e812ad14610138578063164e68de14610162578063236ae0251461018a5780632717153e146101b45780632f516393146101de57610134565b3661013457005b5f80fd5b348015610143575f80fd5b5061014c61048a565b60405161015991906125dc565b60405180910390f35b34801561016d575f80fd5b5061018860048036038101906101839190612660565b610493565b005b348015610195575f80fd5b5061019e61064a565b6040516101ab91906125dc565b60405180910390f35b3480156101bf575f80fd5b506101c8610650565b6040516101d591906126e6565b60405180910390f35b3480156101e9575f80fd5b5061020460048036038101906101ff9190612729565b610668565b60405161021191906125dc565b60405180910390f35b348015610225575f80fd5b50610240600480360381019061023b9190612767565b6106bc565b005b34801561024d575f80fd5b5061025661070e565b60405161026391906125dc565b60405180910390f35b348015610277575f80fd5b50610280610714565b005b34801561028d575f80fd5b50610296610727565b6040516102a391906127b2565b60405180910390f35b3480156102b7575f80fd5b506102c061074e565b6040516102cd91906127b2565b60405180910390f35b3480156102e1575f80fd5b506102ea610772565b6040516102f791906126e6565b60405180910390f35b34801561030b575f80fd5b5061031461078a565b60405161032191906125dc565b60405180910390f35b348015610335575f80fd5b5061033e610797565b60405161034b91906127b2565b60405180910390f35b61036e600480360381019061036991906127f5565b6107af565b005b61038a600480360381019061038591906127f5565b610aef565b005b6103a660048036038101906103a1919061296f565b610db3565b6040516103b391906127b2565b60405180910390f35b3480156103c7575f80fd5b506103e260048036038101906103dd9190612767565b6110e8565b005b3480156103ef575f80fd5b506103f861113a565b6040516104059190612a94565b60405180910390f35b348015610419575f80fd5b50610422611152565b60405161042f9190612acd565b60405180910390f35b348015610443575f80fd5b5061045e60048036038101906104599190612ae6565b61116a565b005b34801561046b575f80fd5b506104746111ee565b6040516104819190612b31565b60405180910390f35b5f600254905090565b61049b611206565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610509576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050090612bca565b60405180910390fd5b5f4790505f811161054f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054690612c58565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff167fc0819c13be868895eb93e40eaceb96de976442fa1d404e5c55f14bb65a8c489a8260405161059591906125dc565b60405180910390a25f8273ffffffffffffffffffffffffffffffffffffffff16826040516105c290612ca3565b5f6040518083038185875af1925050503d805f81146105fc576040519150601f19603f3d011682016040523d82523d5f602084013e610601565b606091505b5050905080610645576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063c90612d27565b60405180910390fd5b505050565b60035481565b733a6c545c9e07e6d3041dc802033400f7fbf96c9a81565b5f600a6002546106789190612d9f565b82600a6002546106889190612d9f565b6106929190612dcf565b846002546106a09190612dcf565b6106aa9190612e10565b6106b49190612e10565b905092915050565b6106c4611206565b5f6002549050816002819055507f19ad72acd40a59cad104f97c7897cc5675e52fe1e2679088c4bfffd96a9d58a78183604051610702929190612e43565b60405180910390a15050565b60025481565b61071c611206565b6107255f61128d565b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b733a6c545c9e07e6d3041dc802033400f7fbf96c9a81565b683635c9adc5dea0000081565b73a1077a294dde1b09bb078844df40758a5d0f9a2781565b683635c9adc5dea000003410156107fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f290612eda565b60405180910390fd5b5f8273ffffffffffffffffffffffffffffffffffffffff166360f96a8f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610845573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108699190612f0c565b90506108983330848473ffffffffffffffffffffffffffffffffffffffff1661134e909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b384846040518363ffffffff1660e01b81526004016108d3929190612f37565b6020604051808303815f875af11580156108ef573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109139190612f93565b508273ffffffffffffffffffffffffffffffffffffffff166342966c68836040518263ffffffff1660e01b815260040161094d91906125dc565b5f604051808303815f87803b158015610964575f80fd5b505af1158015610976573d5f803e3d5ffd5b505050506109a533838573ffffffffffffffffffffffffffffffffffffffff166113d09092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fefe44ac71942e60794cabebdc96e2511944d081d971c0f254c56db0bd7dbb59e683635c9adc5dea00000604051610a0b91906125dc565b60405180910390a3683635c9adc5dea00000341115610ae2575f3373ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000034610a519190612fbe565b604051610a5d90612ca3565b5f6040518083038185875af1925050503d805f8114610a97576040519150601f19603f3d011682016040523d82523d5f602084013e610a9c565b606091505b5050905080610ae0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad790613061565b60405180910390fd5b505b610aea61144f565b505050565b683635c9adc5dea00000341015610b3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b32906130ef565b60405180910390fd5b610b683330838573ffffffffffffffffffffffffffffffffffffffff1661134e909392919063ffffffff16565b8173ffffffffffffffffffffffffffffffffffffffff1663379607f5826040518263ffffffff1660e01b8152600401610ba191906125dc565b5f604051808303815f87803b158015610bb8575f80fd5b505af1158015610bca573d5f803e3d5ffd5b505050505f8273ffffffffffffffffffffffffffffffffffffffff166360f96a8f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c18573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c3c9190612f0c565b9050610c6933838373ffffffffffffffffffffffffffffffffffffffff166113d09092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f2fac64c532aa3e0dd6d664395670b91d5748ac34e0e76ce5ee16b208cd575866683635c9adc5dea00000604051610ccf91906125dc565b60405180910390a3683635c9adc5dea00000341115610da6575f3373ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000034610d159190612fbe565b604051610d2190612ca3565b5f6040518083038185875af1925050503d805f8114610d5b576040519150601f19603f3d011682016040523d82523d5f602084013e610d60565b606091505b5050905080610da4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9b90613061565b60405180910390fd5b505b610dae61144f565b505050565b5f80610dbf8484610668565b905080341015610e04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dfb9061317d565b60405180910390fd5b610e4533308c733a6c545c9e07e6d3041dc802033400f7fbf96c9a73ffffffffffffffffffffffffffffffffffffffff1661134e909392919063ffffffff16565b733a6c545c9e07e6d3041dc802033400f7fbf96c9a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b373abef2874c5ef165fc2194c180e06894871724b058c6040518363ffffffff1660e01b8152600401610ea8929190612f37565b6020604051808303815f875af1158015610ec4573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ee89190612f93565b5073abef2874c5ef165fc2194c180e06894871724b0573ffffffffffffffffffffffffffffffffffffffff166392d4d55e8b8b8b8b8b8b6040518763ffffffff1660e01b8152600401610f4096959493929190613205565b6020604051808303815f875af1158015610f5c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f809190612f0c565b9150610fad338b8473ffffffffffffffffffffffffffffffffffffffff166113d09092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fc9a4f13a3c76f1db779ee7c183dcddfa3907d84034be741106d1e3b016284f4b83878760405161100e93929190613279565b60405180910390a3803411156110d3575f3373ffffffffffffffffffffffffffffffffffffffff1682346110429190612fbe565b60405161104e90612ca3565b5f6040518083038185875af1925050503d805f8114611088576040519150601f19603f3d011682016040523d82523d5f602084013e61108d565b606091505b50509050806110d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c890613061565b60405180910390fd5b505b6110db61144f565b5098975050505050505050565b6110f0611206565b5f6003549050816003819055507ff31b8cc3e3babb506a38ebf6e3c4b7bf7b2ae791e82f40149fe9897b855babfc818360405161112e929190612e43565b60405180910390a15050565b733ba90c5a1840dedfdb9838ff4025df240d84a63781565b73abef2874c5ef165fc2194c180e06894871724b0581565b611172611206565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036111e2575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016111d991906127b2565b60405180910390fd5b6111eb8161128d565b50565b73165c3410fc91ef562c50559f7d2289febed552d981565b61120e611601565b73ffffffffffffffffffffffffffffffffffffffff1661122c610727565b73ffffffffffffffffffffffffffffffffffffffff161461128b5761124f611601565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161128291906127b2565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6113ca848573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401611383939291906132ae565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611608565b50505050565b61144a838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401611403929190612f37565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611608565b505050565b6114576116a3565b5f47905060035481101561146b57506115f7565b5f6064600a8361147b9190612dcf565b6114859190612d9f565b90505f81836114949190612fbe565b90505f821115611568575f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16836040516114e390612ca3565b5f6040518083038185875af1925050503d805f811461151d576040519150601f19603f3d011682016040523d82523d5f602084013e611522565b606091505b5050905080611566576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155d90613353565b60405180910390fd5b505b5f61157360056116e9565b90505f805f835111801561158657505f84115b156115b3575f61159585611d21565b90505f8111156115b1576115a98185612017565b809250835191505b505b7fae0d0d5d7403a8c66ce99107583003a06b2e9d7e41bbdefb643f20bbe3b98d2f868684846040516115e89493929190613371565b60405180910390a15050505050505b6115ff6122af565b565b5f33905090565b5f8060205f8451602086015f885af180611627576040513d5f823e3d81fd5b3d92505f519150505f821461164057600181141561165b565b5f8473ffffffffffffffffffffffffffffffffffffffff163b145b1561169d57836040517f5274afe700000000000000000000000000000000000000000000000000000000815260040161169491906127b2565b60405180910390fd5b50505050565b6002600154036116df576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600181905550565b60605f733ba90c5a1840dedfdb9838ff4025df240d84a63773ffffffffffffffffffffffffffffffffffffffff166316f43dd46040518163ffffffff1660e01b8152600401602060405180830381865afa158015611749573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061176d91906133c8565b90505f81036117d2575f67ffffffffffffffff8111156117905761178f61284b565b5b6040519080825280602002602001820160405280156117c957816020015b6117b6612590565b8152602001906001900390816117ae5790505b50915050611d1c565b5f8167ffffffffffffffff8111156117ed576117ec61284b565b5b60405190808252806020026020018201604052801561182657816020015b611813612590565b81526020019060019003908161180b5790505b5090505f804290505f5b84811015611a05575f733ba90c5a1840dedfdb9838ff4025df240d84a63773ffffffffffffffffffffffffffffffffffffffff1663d993de62836040518263ffffffff1660e01b815260040161188691906125dc565b60c060405180830381865afa1580156118a1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118c59190613494565b90508281608001511180156118dd57505f8160400151115b156119f1575f733ba90c5a1840dedfdb9838ff4025df240d84a63773ffffffffffffffffffffffffffffffffffffffff1663cafeedf6846040518263ffffffff1660e01b815260040161193091906125dc565b602060405180830381865afa15801561194b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061196f91906133c8565b90505f8183604001516119829190612fbe565b90505f8111156119ee576040518060600160405280858152602001846020015173ffffffffffffffffffffffffffffffffffffffff168152602001828152508787815181106119d4576119d36134bf565b5b602002602001018190525085806119ea906134ec565b9650505b50505b5080806119fd906134ec565b915050611830565b505f8203611a6c575f67ffffffffffffffff811115611a2757611a2661284b565b5b604051908082528060200260200182016040528015611a6057816020015b611a4d612590565b815260200190600190039081611a455790505b50945050505050611d1c565b5f8267ffffffffffffffff811115611a8757611a8661284b565b5b604051908082528060200260200182016040528015611ac057816020015b611aad612590565b815260200190600190039081611aa55790505b5090505f5b83811015611b1957848181518110611ae057611adf6134bf565b5b6020026020010151828281518110611afb57611afa6134bf565b5b60200260200101819052508080611b11906134ec565b915050611ac5565b505f5b8151811015611c4e575f5b6001828451611b369190612fbe565b611b409190612fbe565b811015611c3a5782600182611b559190612e10565b81518110611b6657611b656134bf565b5b602002602001015160400151838281518110611b8557611b846134bf565b5b6020026020010151604001511015611c27575f838281518110611bab57611baa6134bf565b5b6020026020010151905083600183611bc39190612e10565b81518110611bd457611bd36134bf565b5b6020026020010151848381518110611bef57611bee6134bf565b5b60200260200101819052508084600184611c099190612e10565b81518110611c1a57611c196134bf565b5b6020026020010181905250505b8080611c32906134ec565b915050611b27565b508080611c46906134ec565b915050611b1c565b505f81518810611c5f578151611c61565b875b90505f8167ffffffffffffffff811115611c7e57611c7d61284b565b5b604051908082528060200260200182016040528015611cb757816020015b611ca4612590565b815260200190600190039081611c9c5790505b5090505f5b82811015611d1057838181518110611cd757611cd66134bf565b5b6020026020010151828281518110611cf257611cf16134bf565b5b60200260200101819052508080611d08906134ec565b915050611cbc565b50809750505050505050505b919050565b5f808211611d64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5b906135a3565b60405180910390fd5b5f600267ffffffffffffffff811115611d8057611d7f61284b565b5b604051908082528060200260200182016040528015611dae5781602001602082028036833780820191505090505b50905073a1077a294dde1b09bb078844df40758a5d0f9a27815f81518110611dd957611dd86134bf565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050733a6c545c9e07e6d3041dc802033400f7fbf96c9a81600181518110611e3c57611e3b6134bf565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505f73165c3410fc91ef562c50559f7d2289febed552d973ffffffffffffffffffffffffffffffffffffffff1663d06ca61f85846040518363ffffffff1660e01b8152600401611ec6929190613678565b5f60405180830381865afa158015611ee0573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611f08919061376a565b90505f81600181518110611f1f57611f1e6134bf565b5b602002602001015190505f6103e86103e383611f3b9190612dcf565b611f459190612d9f565b90505f73165c3410fc91ef562c50559f7d2289febed552d973ffffffffffffffffffffffffffffffffffffffff16637ff36ab58884883061012c42611f8a9190612e10565b6040518663ffffffff1660e01b8152600401611fa994939291906137b1565b5f6040518083038185885af1158015611fc4573d5f803e3d5ffd5b50505050506040513d5f823e3d601f19601f82011682018060405250810190611fed919061376a565b905080600181518110612003576120026134bf565b5b602002602001015195505050505050919050565b5f8151148061202557505f82145b6122ab575f805b825181101561207457828181518110612048576120476134bf565b5b6020026020010151604001518261205f9190612e10565b9150808061206c906134ec565b91505061202c565b505f810361208257506122ab565b5f733a6c545c9e07e6d3041dc802033400f7fbf96c9a73ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30733ba90c5a1840dedfdb9838ff4025df240d84a6376040518363ffffffff1660e01b81526004016120e69291906137fb565b602060405180830381865afa158015612101573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061212591906133c8565b90505f81111561216357612162733a6c545c9e07e6d3041dc802033400f7fbf96c9a733ba90c5a1840dedfdb9838ff4025df240d84a637836122b8565b5b612196733a6c545c9e07e6d3041dc802033400f7fbf96c9a733ba90c5a1840dedfdb9838ff4025df240d84a63786612391565b5f5b83518110156122a7575f838583815181106121b6576121b56134bf565b5b602002602001015160400151876121cd9190612dcf565b6121d79190612d9f565b90505f81111561229357733ba90c5a1840dedfdb9838ff4025df240d84a63773ffffffffffffffffffffffffffffffffffffffff1663e6ba3c8b82878581518110612225576122246134bf565b5b60200260200101516020015160076040518463ffffffff1660e01b81526004016122519392919061385b565b6020604051808303815f875af115801561226d573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061229191906133c8565b505b50808061229f906134ec565b915050612198565b5050505b5050565b60018081905550565b5f8373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b81526004016122f49291906137fb565b602060405180830381865afa15801561230f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061233391906133c8565b90508181101561237e578281836040517fe570110f00000000000000000000000000000000000000000000000000000000815260040161237593929190613890565b60405180910390fd5b61238b848484840361242a565b50505050565b5f8373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b81526004016123cd9291906137fb565b602060405180830381865afa1580156123e8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061240c91906133c8565b90506124248484848461241f9190612e10565b61242a565b50505050565b5f8373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3848460405160240161245a929190612f37565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506124a88482612537565b61253157612526848573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3865f6040516024016124df9291906138fe565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611608565b6125308482611608565b5b50505050565b5f805f8060205f8651602088015f8a5af192503d91505f51905082801561258557505f82146125695760018114612584565b5f8673ffffffffffffffffffffffffffffffffffffffff163b115b5b935050505092915050565b60405180606001604052805f81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81525090565b5f819050919050565b6125d6816125c4565b82525050565b5f6020820190506125ef5f8301846125cd565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61262f82612606565b9050919050565b61263f81612625565b8114612649575f80fd5b50565b5f8135905061265a81612636565b92915050565b5f60208284031215612675576126746125fe565b5b5f6126828482850161264c565b91505092915050565b5f819050919050565b5f6126ae6126a96126a484612606565b61268b565b612606565b9050919050565b5f6126bf82612694565b9050919050565b5f6126d0826126b5565b9050919050565b6126e0816126c6565b82525050565b5f6020820190506126f95f8301846126d7565b92915050565b612708816125c4565b8114612712575f80fd5b50565b5f81359050612723816126ff565b92915050565b5f806040838503121561273f5761273e6125fe565b5b5f61274c85828601612715565b925050602061275d85828601612715565b9150509250929050565b5f6020828403121561277c5761277b6125fe565b5b5f61278984828501612715565b91505092915050565b5f61279c82612606565b9050919050565b6127ac81612792565b82525050565b5f6020820190506127c55f8301846127a3565b92915050565b6127d481612792565b81146127de575f80fd5b50565b5f813590506127ef816127cb565b92915050565b5f806040838503121561280b5761280a6125fe565b5b5f612818858286016127e1565b925050602061282985828601612715565b9150509250929050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6128818261283b565b810181811067ffffffffffffffff821117156128a05761289f61284b565b5b80604052505050565b5f6128b26125f5565b90506128be8282612878565b919050565b5f67ffffffffffffffff8211156128dd576128dc61284b565b5b6128e68261283b565b9050602081019050919050565b828183375f83830152505050565b5f61291361290e846128c3565b6128a9565b90508281526020810184848401111561292f5761292e612837565b5b61293a8482856128f3565b509392505050565b5f82601f83011261295657612955612833565b5b8135612966848260208601612901565b91505092915050565b5f805f805f805f80610100898b03121561298c5761298b6125fe565b5b5f6129998b828c01612715565b98505060206129aa8b828c016127e1565b975050604089013567ffffffffffffffff8111156129cb576129ca612602565b5b6129d78b828c01612942565b965050606089013567ffffffffffffffff8111156129f8576129f7612602565b5b612a048b828c01612942565b955050608089013567ffffffffffffffff811115612a2557612a24612602565b5b612a318b828c01612942565b94505060a0612a428b828c01612715565b93505060c0612a538b828c01612715565b92505060e0612a648b828c01612715565b9150509295985092959890939650565b5f612a7e826126b5565b9050919050565b612a8e81612a74565b82525050565b5f602082019050612aa75f830184612a85565b92915050565b5f612ab7826126b5565b9050919050565b612ac781612aad565b82525050565b5f602082019050612ae05f830184612abe565b92915050565b5f60208284031215612afb57612afa6125fe565b5b5f612b08848285016127e1565b91505092915050565b5f612b1b826126b5565b9050919050565b612b2b81612b11565b82525050565b5f602082019050612b445f830184612b22565b92915050565b5f82825260208201905092915050565b7f506c617967726f756e64476174657761793a20526563697069656e742063616e5f8201527f6e6f74206265207a65726f206164647265737300000000000000000000000000602082015250565b5f612bb4603383612b4a565b9150612bbf82612b5a565b604082019050919050565b5f6020820190508181035f830152612be181612ba8565b9050919050565b7f506c617967726f756e64476174657761793a204e6f206665657320746f2077695f8201527f7468647261770000000000000000000000000000000000000000000000000000602082015250565b5f612c42602683612b4a565b9150612c4d82612be8565b604082019050919050565b5f6020820190508181035f830152612c6f81612c36565b9050919050565b5f81905092915050565b50565b5f612c8e5f83612c76565b9150612c9982612c80565b5f82019050919050565b5f612cad82612c83565b9150819050919050565b7f506c617967726f756e64476174657761793a20466565207769746864726177615f8201527f6c206661696c6564000000000000000000000000000000000000000000000000602082015250565b5f612d11602883612b4a565b9150612d1c82612cb7565b604082019050919050565b5f6020820190508181035f830152612d3e81612d05565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612da9826125c4565b9150612db4836125c4565b925082612dc457612dc3612d45565b5b828204905092915050565b5f612dd9826125c4565b9150612de4836125c4565b9250828202612df2816125c4565b91508282048414831517612e0957612e08612d72565b5b5092915050565b5f612e1a826125c4565b9150612e25836125c4565b9250828201905080821115612e3d57612e3c612d72565b5b92915050565b5f604082019050612e565f8301856125cd565b612e6360208301846125cd565b9392505050565b7f506c617967726f756e64476174657761793a20496e73756666696369656e74205f8201527f504c532066656520666f72206275726e00000000000000000000000000000000602082015250565b5f612ec4603083612b4a565b9150612ecf82612e6a565b604082019050919050565b5f6020820190508181035f830152612ef181612eb8565b9050919050565b5f81519050612f06816127cb565b92915050565b5f60208284031215612f2157612f206125fe565b5b5f612f2e84828501612ef8565b91505092915050565b5f604082019050612f4a5f8301856127a3565b612f5760208301846125cd565b9392505050565b5f8115159050919050565b612f7281612f5e565b8114612f7c575f80fd5b50565b5f81519050612f8d81612f69565b92915050565b5f60208284031215612fa857612fa76125fe565b5b5f612fb584828501612f7f565b91505092915050565b5f612fc8826125c4565b9150612fd3836125c4565b9250828203905081811115612feb57612fea612d72565b5b92915050565b7f506c617967726f756e64476174657761793a20504c5320726566756e642066615f8201527f696c656400000000000000000000000000000000000000000000000000000000602082015250565b5f61304b602483612b4a565b915061305682612ff1565b604082019050919050565b5f6020820190508181035f8301526130788161303f565b9050919050565b7f506c617967726f756e64476174657761793a20496e73756666696369656e74205f8201527f504c532066656520666f7220636c61696d000000000000000000000000000000602082015250565b5f6130d9603183612b4a565b91506130e48261307f565b604082019050919050565b5f6020820190508181035f830152613106816130cd565b9050919050565b7f506c617967726f756e64476174657761793a20496e73756666696369656e74205f8201527f504c532066656500000000000000000000000000000000000000000000000000602082015250565b5f613167602783612b4a565b91506131728261310d565b604082019050919050565b5f6020820190508181035f8301526131948161315b565b9050919050565b5f81519050919050565b5f5b838110156131c25780820151818401526020810190506131a7565b5f8484015250505050565b5f6131d78261319b565b6131e18185612b4a565b93506131f18185602086016131a5565b6131fa8161283b565b840191505092915050565b5f60c0820190506132185f8301896125cd565b61322560208301886127a3565b818103604083015261323781876131cd565b9050818103606083015261324b81866131cd565b9050818103608083015261325f81856131cd565b905061326e60a08301846125cd565b979650505050505050565b5f60608201905061328c5f8301866125cd565b61329960208301856125cd565b6132a660408301846125cd565b949350505050565b5f6060820190506132c15f8301866127a3565b6132ce60208301856127a3565b6132db60408301846125cd565b949350505050565b7f506c617967726f756e64476174657761793a204465762077616c6c65742074725f8201527f616e73666572206661696c656400000000000000000000000000000000000000602082015250565b5f61333d602d83612b4a565b9150613348826132e3565b604082019050919050565b5f6020820190508181035f83015261336a81613331565b9050919050565b5f6080820190506133845f8301876125cd565b61339160208301866125cd565b61339e60408301856125cd565b6133ab60608301846125cd565b95945050505050565b5f815190506133c2816126ff565b92915050565b5f602082840312156133dd576133dc6125fe565b5b5f6133ea848285016133b4565b91505092915050565b5f80fd5b5f60c0828403121561340c5761340b6133f3565b5b61341660c06128a9565b90505f61342584828501612ef8565b5f83015250602061343884828501612ef8565b602083015250604061344c848285016133b4565b6040830152506060613460848285016133b4565b6060830152506080613474848285016133b4565b60808301525060a0613488848285016133b4565b60a08301525092915050565b5f60c082840312156134a9576134a86125fe565b5b5f6134b6848285016133f7565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6134f6826125c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361352857613527612d72565b5b600182019050919050565b7f506c617967726f756e64476174657761793a20504c5320616d6f756e74206d755f8201527f7374206265203e20300000000000000000000000000000000000000000000000602082015250565b5f61358d602983612b4a565b915061359882613533565b604082019050919050565b5f6020820190508181035f8301526135ba81613581565b9050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6135f381612792565b82525050565b5f61360483836135ea565b60208301905092915050565b5f602082019050919050565b5f613626826135c1565b61363081856135cb565b935061363b836135db565b805f5b8381101561366b57815161365288826135f9565b975061365d83613610565b92505060018101905061363e565b5085935050505092915050565b5f60408201905061368b5f8301856125cd565b818103602083015261369d818461361c565b90509392505050565b5f67ffffffffffffffff8211156136c0576136bf61284b565b5b602082029050602081019050919050565b5f80fd5b5f6136e76136e2846136a6565b6128a9565b9050808382526020820190506020840283018581111561370a576137096136d1565b5b835b81811015613733578061371f88826133b4565b84526020840193505060208101905061370c565b5050509392505050565b5f82601f83011261375157613750612833565b5b81516137618482602086016136d5565b91505092915050565b5f6020828403121561377f5761377e6125fe565b5b5f82015167ffffffffffffffff81111561379c5761379b612602565b5b6137a88482850161373d565b91505092915050565b5f6080820190506137c45f8301876125cd565b81810360208301526137d6818661361c565b90506137e560408301856127a3565b6137f260608301846125cd565b95945050505050565b5f60408201905061380e5f8301856127a3565b61381b60208301846127a3565b9392505050565b5f819050919050565b5f61384561384061383b84613822565b61268b565b6125c4565b9050919050565b6138558161382b565b82525050565b5f60608201905061386e5f8301866125cd565b61387b60208301856127a3565b613888604083018461384c565b949350505050565b5f6060820190506138a35f8301866127a3565b6138b060208301856125cd565b6138bd60408301846125cd565b949350505050565b5f819050919050565b5f6138e86138e36138de846138c5565b61268b565b6125c4565b9050919050565b6138f8816138ce565b82525050565b5f6040820190506139115f8301856127a3565b61391e60208301846138ef565b939250505056fea26469706673582212202acb780312be48ca12b74125a4652da4f60287cbe1b5f3151562ee0ca6f83b0964736f6c6343000814003300000000000000000000000035d360d7d53cc96df768fd2dec2eefa4c2f01292

Deployed ByteCode

0x60806040526004361061012d575f3560e01c80638f1a4e50116100aa578063b62097081161006e578063b62097081461038c578063b9b4744a146103bc578063bfe10928146103e4578063c45a01551461040e578063f2fde38b14610438578063f887ea401461046057610134565b80638f1a4e50146102d65780638f396d5714610300578063927ef7fa1461032a5780639dc29fac14610354578063aad3ec961461037057610134565b806346860698116100f1578063468606981461021a5780636ef25c3a14610242578063715018a61461026c5780638da5cb5b146102825780638ea5220f146102ac57610134565b806315e812ad14610138578063164e68de14610162578063236ae0251461018a5780632717153e146101b45780632f516393146101de57610134565b3661013457005b5f80fd5b348015610143575f80fd5b5061014c61048a565b60405161015991906125dc565b60405180910390f35b34801561016d575f80fd5b5061018860048036038101906101839190612660565b610493565b005b348015610195575f80fd5b5061019e61064a565b6040516101ab91906125dc565b60405180910390f35b3480156101bf575f80fd5b506101c8610650565b6040516101d591906126e6565b60405180910390f35b3480156101e9575f80fd5b5061020460048036038101906101ff9190612729565b610668565b60405161021191906125dc565b60405180910390f35b348015610225575f80fd5b50610240600480360381019061023b9190612767565b6106bc565b005b34801561024d575f80fd5b5061025661070e565b60405161026391906125dc565b60405180910390f35b348015610277575f80fd5b50610280610714565b005b34801561028d575f80fd5b50610296610727565b6040516102a391906127b2565b60405180910390f35b3480156102b7575f80fd5b506102c061074e565b6040516102cd91906127b2565b60405180910390f35b3480156102e1575f80fd5b506102ea610772565b6040516102f791906126e6565b60405180910390f35b34801561030b575f80fd5b5061031461078a565b60405161032191906125dc565b60405180910390f35b348015610335575f80fd5b5061033e610797565b60405161034b91906127b2565b60405180910390f35b61036e600480360381019061036991906127f5565b6107af565b005b61038a600480360381019061038591906127f5565b610aef565b005b6103a660048036038101906103a1919061296f565b610db3565b6040516103b391906127b2565b60405180910390f35b3480156103c7575f80fd5b506103e260048036038101906103dd9190612767565b6110e8565b005b3480156103ef575f80fd5b506103f861113a565b6040516104059190612a94565b60405180910390f35b348015610419575f80fd5b50610422611152565b60405161042f9190612acd565b60405180910390f35b348015610443575f80fd5b5061045e60048036038101906104599190612ae6565b61116a565b005b34801561046b575f80fd5b506104746111ee565b6040516104819190612b31565b60405180910390f35b5f600254905090565b61049b611206565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610509576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050090612bca565b60405180910390fd5b5f4790505f811161054f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054690612c58565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff167fc0819c13be868895eb93e40eaceb96de976442fa1d404e5c55f14bb65a8c489a8260405161059591906125dc565b60405180910390a25f8273ffffffffffffffffffffffffffffffffffffffff16826040516105c290612ca3565b5f6040518083038185875af1925050503d805f81146105fc576040519150601f19603f3d011682016040523d82523d5f602084013e610601565b606091505b5050905080610645576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063c90612d27565b60405180910390fd5b505050565b60035481565b733a6c545c9e07e6d3041dc802033400f7fbf96c9a81565b5f600a6002546106789190612d9f565b82600a6002546106889190612d9f565b6106929190612dcf565b846002546106a09190612dcf565b6106aa9190612e10565b6106b49190612e10565b905092915050565b6106c4611206565b5f6002549050816002819055507f19ad72acd40a59cad104f97c7897cc5675e52fe1e2679088c4bfffd96a9d58a78183604051610702929190612e43565b60405180910390a15050565b60025481565b61071c611206565b6107255f61128d565b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f00000000000000000000000035d360d7d53cc96df768fd2dec2eefa4c2f0129281565b733a6c545c9e07e6d3041dc802033400f7fbf96c9a81565b683635c9adc5dea0000081565b73a1077a294dde1b09bb078844df40758a5d0f9a2781565b683635c9adc5dea000003410156107fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f290612eda565b60405180910390fd5b5f8273ffffffffffffffffffffffffffffffffffffffff166360f96a8f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610845573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108699190612f0c565b90506108983330848473ffffffffffffffffffffffffffffffffffffffff1661134e909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b384846040518363ffffffff1660e01b81526004016108d3929190612f37565b6020604051808303815f875af11580156108ef573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109139190612f93565b508273ffffffffffffffffffffffffffffffffffffffff166342966c68836040518263ffffffff1660e01b815260040161094d91906125dc565b5f604051808303815f87803b158015610964575f80fd5b505af1158015610976573d5f803e3d5ffd5b505050506109a533838573ffffffffffffffffffffffffffffffffffffffff166113d09092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fefe44ac71942e60794cabebdc96e2511944d081d971c0f254c56db0bd7dbb59e683635c9adc5dea00000604051610a0b91906125dc565b60405180910390a3683635c9adc5dea00000341115610ae2575f3373ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000034610a519190612fbe565b604051610a5d90612ca3565b5f6040518083038185875af1925050503d805f8114610a97576040519150601f19603f3d011682016040523d82523d5f602084013e610a9c565b606091505b5050905080610ae0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad790613061565b60405180910390fd5b505b610aea61144f565b505050565b683635c9adc5dea00000341015610b3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b32906130ef565b60405180910390fd5b610b683330838573ffffffffffffffffffffffffffffffffffffffff1661134e909392919063ffffffff16565b8173ffffffffffffffffffffffffffffffffffffffff1663379607f5826040518263ffffffff1660e01b8152600401610ba191906125dc565b5f604051808303815f87803b158015610bb8575f80fd5b505af1158015610bca573d5f803e3d5ffd5b505050505f8273ffffffffffffffffffffffffffffffffffffffff166360f96a8f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c18573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c3c9190612f0c565b9050610c6933838373ffffffffffffffffffffffffffffffffffffffff166113d09092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f2fac64c532aa3e0dd6d664395670b91d5748ac34e0e76ce5ee16b208cd575866683635c9adc5dea00000604051610ccf91906125dc565b60405180910390a3683635c9adc5dea00000341115610da6575f3373ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000034610d159190612fbe565b604051610d2190612ca3565b5f6040518083038185875af1925050503d805f8114610d5b576040519150601f19603f3d011682016040523d82523d5f602084013e610d60565b606091505b5050905080610da4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9b90613061565b60405180910390fd5b505b610dae61144f565b505050565b5f80610dbf8484610668565b905080341015610e04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dfb9061317d565b60405180910390fd5b610e4533308c733a6c545c9e07e6d3041dc802033400f7fbf96c9a73ffffffffffffffffffffffffffffffffffffffff1661134e909392919063ffffffff16565b733a6c545c9e07e6d3041dc802033400f7fbf96c9a73ffffffffffffffffffffffffffffffffffffffff1663095ea7b373abef2874c5ef165fc2194c180e06894871724b058c6040518363ffffffff1660e01b8152600401610ea8929190612f37565b6020604051808303815f875af1158015610ec4573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ee89190612f93565b5073abef2874c5ef165fc2194c180e06894871724b0573ffffffffffffffffffffffffffffffffffffffff166392d4d55e8b8b8b8b8b8b6040518763ffffffff1660e01b8152600401610f4096959493929190613205565b6020604051808303815f875af1158015610f5c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f809190612f0c565b9150610fad338b8473ffffffffffffffffffffffffffffffffffffffff166113d09092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fc9a4f13a3c76f1db779ee7c183dcddfa3907d84034be741106d1e3b016284f4b83878760405161100e93929190613279565b60405180910390a3803411156110d3575f3373ffffffffffffffffffffffffffffffffffffffff1682346110429190612fbe565b60405161104e90612ca3565b5f6040518083038185875af1925050503d805f8114611088576040519150601f19603f3d011682016040523d82523d5f602084013e61108d565b606091505b50509050806110d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c890613061565b60405180910390fd5b505b6110db61144f565b5098975050505050505050565b6110f0611206565b5f6003549050816003819055507ff31b8cc3e3babb506a38ebf6e3c4b7bf7b2ae791e82f40149fe9897b855babfc818360405161112e929190612e43565b60405180910390a15050565b733ba90c5a1840dedfdb9838ff4025df240d84a63781565b73abef2874c5ef165fc2194c180e06894871724b0581565b611172611206565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036111e2575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016111d991906127b2565b60405180910390fd5b6111eb8161128d565b50565b73165c3410fc91ef562c50559f7d2289febed552d981565b61120e611601565b73ffffffffffffffffffffffffffffffffffffffff1661122c610727565b73ffffffffffffffffffffffffffffffffffffffff161461128b5761124f611601565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161128291906127b2565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6113ca848573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401611383939291906132ae565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611608565b50505050565b61144a838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401611403929190612f37565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611608565b505050565b6114576116a3565b5f47905060035481101561146b57506115f7565b5f6064600a8361147b9190612dcf565b6114859190612d9f565b90505f81836114949190612fbe565b90505f821115611568575f7f00000000000000000000000035d360d7d53cc96df768fd2dec2eefa4c2f0129273ffffffffffffffffffffffffffffffffffffffff16836040516114e390612ca3565b5f6040518083038185875af1925050503d805f811461151d576040519150601f19603f3d011682016040523d82523d5f602084013e611522565b606091505b5050905080611566576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155d90613353565b60405180910390fd5b505b5f61157360056116e9565b90505f805f835111801561158657505f84115b156115b3575f61159585611d21565b90505f8111156115b1576115a98185612017565b809250835191505b505b7fae0d0d5d7403a8c66ce99107583003a06b2e9d7e41bbdefb643f20bbe3b98d2f868684846040516115e89493929190613371565b60405180910390a15050505050505b6115ff6122af565b565b5f33905090565b5f8060205f8451602086015f885af180611627576040513d5f823e3d81fd5b3d92505f519150505f821461164057600181141561165b565b5f8473ffffffffffffffffffffffffffffffffffffffff163b145b1561169d57836040517f5274afe700000000000000000000000000000000000000000000000000000000815260040161169491906127b2565b60405180910390fd5b50505050565b6002600154036116df576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600181905550565b60605f733ba90c5a1840dedfdb9838ff4025df240d84a63773ffffffffffffffffffffffffffffffffffffffff166316f43dd46040518163ffffffff1660e01b8152600401602060405180830381865afa158015611749573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061176d91906133c8565b90505f81036117d2575f67ffffffffffffffff8111156117905761178f61284b565b5b6040519080825280602002602001820160405280156117c957816020015b6117b6612590565b8152602001906001900390816117ae5790505b50915050611d1c565b5f8167ffffffffffffffff8111156117ed576117ec61284b565b5b60405190808252806020026020018201604052801561182657816020015b611813612590565b81526020019060019003908161180b5790505b5090505f804290505f5b84811015611a05575f733ba90c5a1840dedfdb9838ff4025df240d84a63773ffffffffffffffffffffffffffffffffffffffff1663d993de62836040518263ffffffff1660e01b815260040161188691906125dc565b60c060405180830381865afa1580156118a1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118c59190613494565b90508281608001511180156118dd57505f8160400151115b156119f1575f733ba90c5a1840dedfdb9838ff4025df240d84a63773ffffffffffffffffffffffffffffffffffffffff1663cafeedf6846040518263ffffffff1660e01b815260040161193091906125dc565b602060405180830381865afa15801561194b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061196f91906133c8565b90505f8183604001516119829190612fbe565b90505f8111156119ee576040518060600160405280858152602001846020015173ffffffffffffffffffffffffffffffffffffffff168152602001828152508787815181106119d4576119d36134bf565b5b602002602001018190525085806119ea906134ec565b9650505b50505b5080806119fd906134ec565b915050611830565b505f8203611a6c575f67ffffffffffffffff811115611a2757611a2661284b565b5b604051908082528060200260200182016040528015611a6057816020015b611a4d612590565b815260200190600190039081611a455790505b50945050505050611d1c565b5f8267ffffffffffffffff811115611a8757611a8661284b565b5b604051908082528060200260200182016040528015611ac057816020015b611aad612590565b815260200190600190039081611aa55790505b5090505f5b83811015611b1957848181518110611ae057611adf6134bf565b5b6020026020010151828281518110611afb57611afa6134bf565b5b60200260200101819052508080611b11906134ec565b915050611ac5565b505f5b8151811015611c4e575f5b6001828451611b369190612fbe565b611b409190612fbe565b811015611c3a5782600182611b559190612e10565b81518110611b6657611b656134bf565b5b602002602001015160400151838281518110611b8557611b846134bf565b5b6020026020010151604001511015611c27575f838281518110611bab57611baa6134bf565b5b6020026020010151905083600183611bc39190612e10565b81518110611bd457611bd36134bf565b5b6020026020010151848381518110611bef57611bee6134bf565b5b60200260200101819052508084600184611c099190612e10565b81518110611c1a57611c196134bf565b5b6020026020010181905250505b8080611c32906134ec565b915050611b27565b508080611c46906134ec565b915050611b1c565b505f81518810611c5f578151611c61565b875b90505f8167ffffffffffffffff811115611c7e57611c7d61284b565b5b604051908082528060200260200182016040528015611cb757816020015b611ca4612590565b815260200190600190039081611c9c5790505b5090505f5b82811015611d1057838181518110611cd757611cd66134bf565b5b6020026020010151828281518110611cf257611cf16134bf565b5b60200260200101819052508080611d08906134ec565b915050611cbc565b50809750505050505050505b919050565b5f808211611d64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5b906135a3565b60405180910390fd5b5f600267ffffffffffffffff811115611d8057611d7f61284b565b5b604051908082528060200260200182016040528015611dae5781602001602082028036833780820191505090505b50905073a1077a294dde1b09bb078844df40758a5d0f9a27815f81518110611dd957611dd86134bf565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050733a6c545c9e07e6d3041dc802033400f7fbf96c9a81600181518110611e3c57611e3b6134bf565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505f73165c3410fc91ef562c50559f7d2289febed552d973ffffffffffffffffffffffffffffffffffffffff1663d06ca61f85846040518363ffffffff1660e01b8152600401611ec6929190613678565b5f60405180830381865afa158015611ee0573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611f08919061376a565b90505f81600181518110611f1f57611f1e6134bf565b5b602002602001015190505f6103e86103e383611f3b9190612dcf565b611f459190612d9f565b90505f73165c3410fc91ef562c50559f7d2289febed552d973ffffffffffffffffffffffffffffffffffffffff16637ff36ab58884883061012c42611f8a9190612e10565b6040518663ffffffff1660e01b8152600401611fa994939291906137b1565b5f6040518083038185885af1158015611fc4573d5f803e3d5ffd5b50505050506040513d5f823e3d601f19601f82011682018060405250810190611fed919061376a565b905080600181518110612003576120026134bf565b5b602002602001015195505050505050919050565b5f8151148061202557505f82145b6122ab575f805b825181101561207457828181518110612048576120476134bf565b5b6020026020010151604001518261205f9190612e10565b9150808061206c906134ec565b91505061202c565b505f810361208257506122ab565b5f733a6c545c9e07e6d3041dc802033400f7fbf96c9a73ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30733ba90c5a1840dedfdb9838ff4025df240d84a6376040518363ffffffff1660e01b81526004016120e69291906137fb565b602060405180830381865afa158015612101573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061212591906133c8565b90505f81111561216357612162733a6c545c9e07e6d3041dc802033400f7fbf96c9a733ba90c5a1840dedfdb9838ff4025df240d84a637836122b8565b5b612196733a6c545c9e07e6d3041dc802033400f7fbf96c9a733ba90c5a1840dedfdb9838ff4025df240d84a63786612391565b5f5b83518110156122a7575f838583815181106121b6576121b56134bf565b5b602002602001015160400151876121cd9190612dcf565b6121d79190612d9f565b90505f81111561229357733ba90c5a1840dedfdb9838ff4025df240d84a63773ffffffffffffffffffffffffffffffffffffffff1663e6ba3c8b82878581518110612225576122246134bf565b5b60200260200101516020015160076040518463ffffffff1660e01b81526004016122519392919061385b565b6020604051808303815f875af115801561226d573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061229191906133c8565b505b50808061229f906134ec565b915050612198565b5050505b5050565b60018081905550565b5f8373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b81526004016122f49291906137fb565b602060405180830381865afa15801561230f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061233391906133c8565b90508181101561237e578281836040517fe570110f00000000000000000000000000000000000000000000000000000000815260040161237593929190613890565b60405180910390fd5b61238b848484840361242a565b50505050565b5f8373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b81526004016123cd9291906137fb565b602060405180830381865afa1580156123e8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061240c91906133c8565b90506124248484848461241f9190612e10565b61242a565b50505050565b5f8373ffffffffffffffffffffffffffffffffffffffff1663095ea7b3848460405160240161245a929190612f37565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506124a88482612537565b61253157612526848573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3865f6040516024016124df9291906138fe565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611608565b6125308482611608565b5b50505050565b5f805f8060205f8651602088015f8a5af192503d91505f51905082801561258557505f82146125695760018114612584565b5f8673ffffffffffffffffffffffffffffffffffffffff163b115b5b935050505092915050565b60405180606001604052805f81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81525090565b5f819050919050565b6125d6816125c4565b82525050565b5f6020820190506125ef5f8301846125cd565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61262f82612606565b9050919050565b61263f81612625565b8114612649575f80fd5b50565b5f8135905061265a81612636565b92915050565b5f60208284031215612675576126746125fe565b5b5f6126828482850161264c565b91505092915050565b5f819050919050565b5f6126ae6126a96126a484612606565b61268b565b612606565b9050919050565b5f6126bf82612694565b9050919050565b5f6126d0826126b5565b9050919050565b6126e0816126c6565b82525050565b5f6020820190506126f95f8301846126d7565b92915050565b612708816125c4565b8114612712575f80fd5b50565b5f81359050612723816126ff565b92915050565b5f806040838503121561273f5761273e6125fe565b5b5f61274c85828601612715565b925050602061275d85828601612715565b9150509250929050565b5f6020828403121561277c5761277b6125fe565b5b5f61278984828501612715565b91505092915050565b5f61279c82612606565b9050919050565b6127ac81612792565b82525050565b5f6020820190506127c55f8301846127a3565b92915050565b6127d481612792565b81146127de575f80fd5b50565b5f813590506127ef816127cb565b92915050565b5f806040838503121561280b5761280a6125fe565b5b5f612818858286016127e1565b925050602061282985828601612715565b9150509250929050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6128818261283b565b810181811067ffffffffffffffff821117156128a05761289f61284b565b5b80604052505050565b5f6128b26125f5565b90506128be8282612878565b919050565b5f67ffffffffffffffff8211156128dd576128dc61284b565b5b6128e68261283b565b9050602081019050919050565b828183375f83830152505050565b5f61291361290e846128c3565b6128a9565b90508281526020810184848401111561292f5761292e612837565b5b61293a8482856128f3565b509392505050565b5f82601f83011261295657612955612833565b5b8135612966848260208601612901565b91505092915050565b5f805f805f805f80610100898b03121561298c5761298b6125fe565b5b5f6129998b828c01612715565b98505060206129aa8b828c016127e1565b975050604089013567ffffffffffffffff8111156129cb576129ca612602565b5b6129d78b828c01612942565b965050606089013567ffffffffffffffff8111156129f8576129f7612602565b5b612a048b828c01612942565b955050608089013567ffffffffffffffff811115612a2557612a24612602565b5b612a318b828c01612942565b94505060a0612a428b828c01612715565b93505060c0612a538b828c01612715565b92505060e0612a648b828c01612715565b9150509295985092959890939650565b5f612a7e826126b5565b9050919050565b612a8e81612a74565b82525050565b5f602082019050612aa75f830184612a85565b92915050565b5f612ab7826126b5565b9050919050565b612ac781612aad565b82525050565b5f602082019050612ae05f830184612abe565b92915050565b5f60208284031215612afb57612afa6125fe565b5b5f612b08848285016127e1565b91505092915050565b5f612b1b826126b5565b9050919050565b612b2b81612b11565b82525050565b5f602082019050612b445f830184612b22565b92915050565b5f82825260208201905092915050565b7f506c617967726f756e64476174657761793a20526563697069656e742063616e5f8201527f6e6f74206265207a65726f206164647265737300000000000000000000000000602082015250565b5f612bb4603383612b4a565b9150612bbf82612b5a565b604082019050919050565b5f6020820190508181035f830152612be181612ba8565b9050919050565b7f506c617967726f756e64476174657761793a204e6f206665657320746f2077695f8201527f7468647261770000000000000000000000000000000000000000000000000000602082015250565b5f612c42602683612b4a565b9150612c4d82612be8565b604082019050919050565b5f6020820190508181035f830152612c6f81612c36565b9050919050565b5f81905092915050565b50565b5f612c8e5f83612c76565b9150612c9982612c80565b5f82019050919050565b5f612cad82612c83565b9150819050919050565b7f506c617967726f756e64476174657761793a20466565207769746864726177615f8201527f6c206661696c6564000000000000000000000000000000000000000000000000602082015250565b5f612d11602883612b4a565b9150612d1c82612cb7565b604082019050919050565b5f6020820190508181035f830152612d3e81612d05565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612da9826125c4565b9150612db4836125c4565b925082612dc457612dc3612d45565b5b828204905092915050565b5f612dd9826125c4565b9150612de4836125c4565b9250828202612df2816125c4565b91508282048414831517612e0957612e08612d72565b5b5092915050565b5f612e1a826125c4565b9150612e25836125c4565b9250828201905080821115612e3d57612e3c612d72565b5b92915050565b5f604082019050612e565f8301856125cd565b612e6360208301846125cd565b9392505050565b7f506c617967726f756e64476174657761793a20496e73756666696369656e74205f8201527f504c532066656520666f72206275726e00000000000000000000000000000000602082015250565b5f612ec4603083612b4a565b9150612ecf82612e6a565b604082019050919050565b5f6020820190508181035f830152612ef181612eb8565b9050919050565b5f81519050612f06816127cb565b92915050565b5f60208284031215612f2157612f206125fe565b5b5f612f2e84828501612ef8565b91505092915050565b5f604082019050612f4a5f8301856127a3565b612f5760208301846125cd565b9392505050565b5f8115159050919050565b612f7281612f5e565b8114612f7c575f80fd5b50565b5f81519050612f8d81612f69565b92915050565b5f60208284031215612fa857612fa76125fe565b5b5f612fb584828501612f7f565b91505092915050565b5f612fc8826125c4565b9150612fd3836125c4565b9250828203905081811115612feb57612fea612d72565b5b92915050565b7f506c617967726f756e64476174657761793a20504c5320726566756e642066615f8201527f696c656400000000000000000000000000000000000000000000000000000000602082015250565b5f61304b602483612b4a565b915061305682612ff1565b604082019050919050565b5f6020820190508181035f8301526130788161303f565b9050919050565b7f506c617967726f756e64476174657761793a20496e73756666696369656e74205f8201527f504c532066656520666f7220636c61696d000000000000000000000000000000602082015250565b5f6130d9603183612b4a565b91506130e48261307f565b604082019050919050565b5f6020820190508181035f830152613106816130cd565b9050919050565b7f506c617967726f756e64476174657761793a20496e73756666696369656e74205f8201527f504c532066656500000000000000000000000000000000000000000000000000602082015250565b5f613167602783612b4a565b91506131728261310d565b604082019050919050565b5f6020820190508181035f8301526131948161315b565b9050919050565b5f81519050919050565b5f5b838110156131c25780820151818401526020810190506131a7565b5f8484015250505050565b5f6131d78261319b565b6131e18185612b4a565b93506131f18185602086016131a5565b6131fa8161283b565b840191505092915050565b5f60c0820190506132185f8301896125cd565b61322560208301886127a3565b818103604083015261323781876131cd565b9050818103606083015261324b81866131cd565b9050818103608083015261325f81856131cd565b905061326e60a08301846125cd565b979650505050505050565b5f60608201905061328c5f8301866125cd565b61329960208301856125cd565b6132a660408301846125cd565b949350505050565b5f6060820190506132c15f8301866127a3565b6132ce60208301856127a3565b6132db60408301846125cd565b949350505050565b7f506c617967726f756e64476174657761793a204465762077616c6c65742074725f8201527f616e73666572206661696c656400000000000000000000000000000000000000602082015250565b5f61333d602d83612b4a565b9150613348826132e3565b604082019050919050565b5f6020820190508181035f83015261336a81613331565b9050919050565b5f6080820190506133845f8301876125cd565b61339160208301866125cd565b61339e60408301856125cd565b6133ab60608301846125cd565b95945050505050565b5f815190506133c2816126ff565b92915050565b5f602082840312156133dd576133dc6125fe565b5b5f6133ea848285016133b4565b91505092915050565b5f80fd5b5f60c0828403121561340c5761340b6133f3565b5b61341660c06128a9565b90505f61342584828501612ef8565b5f83015250602061343884828501612ef8565b602083015250604061344c848285016133b4565b6040830152506060613460848285016133b4565b6060830152506080613474848285016133b4565b60808301525060a0613488848285016133b4565b60a08301525092915050565b5f60c082840312156134a9576134a86125fe565b5b5f6134b6848285016133f7565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6134f6826125c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361352857613527612d72565b5b600182019050919050565b7f506c617967726f756e64476174657761793a20504c5320616d6f756e74206d755f8201527f7374206265203e20300000000000000000000000000000000000000000000000602082015250565b5f61358d602983612b4a565b915061359882613533565b604082019050919050565b5f6020820190508181035f8301526135ba81613581565b9050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6135f381612792565b82525050565b5f61360483836135ea565b60208301905092915050565b5f602082019050919050565b5f613626826135c1565b61363081856135cb565b935061363b836135db565b805f5b8381101561366b57815161365288826135f9565b975061365d83613610565b92505060018101905061363e565b5085935050505092915050565b5f60408201905061368b5f8301856125cd565b818103602083015261369d818461361c565b90509392505050565b5f67ffffffffffffffff8211156136c0576136bf61284b565b5b602082029050602081019050919050565b5f80fd5b5f6136e76136e2846136a6565b6128a9565b9050808382526020820190506020840283018581111561370a576137096136d1565b5b835b81811015613733578061371f88826133b4565b84526020840193505060208101905061370c565b5050509392505050565b5f82601f83011261375157613750612833565b5b81516137618482602086016136d5565b91505092915050565b5f6020828403121561377f5761377e6125fe565b5b5f82015167ffffffffffffffff81111561379c5761379b612602565b5b6137a88482850161373d565b91505092915050565b5f6080820190506137c45f8301876125cd565b81810360208301526137d6818661361c565b90506137e560408301856127a3565b6137f260608301846125cd565b95945050505050565b5f60408201905061380e5f8301856127a3565b61381b60208301846127a3565b9392505050565b5f819050919050565b5f61384561384061383b84613822565b61268b565b6125c4565b9050919050565b6138558161382b565b82525050565b5f60608201905061386e5f8301866125cd565b61387b60208301856127a3565b613888604083018461384c565b949350505050565b5f6060820190506138a35f8301866127a3565b6138b060208301856125cd565b6138bd60408301846125cd565b949350505050565b5f819050919050565b5f6138e86138e36138de846138c5565b61268b565b6125c4565b9050919050565b6138f8816138ce565b82525050565b5f6040820190506139115f8301856127a3565b61391e60208301846138ef565b939250505056fea26469706673582212202acb780312be48ca12b74125a4652da4f60287cbe1b5f3151562ee0ca6f83b0964736f6c63430008140033