Address Details
contract

0x029B4665F45b53aCB6BA7f54d49c62A832F25cfC

Contract Name
NFTStoreFront
Creator
0x4c45c6–9e9f2c at 0x33e818–766055
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
130 Transactions
Transfers
0 Transfers
Gas Used
104,661,062
Last Balance Update
15961986
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
NFTStoreFront




Optimization enabled
false
Compiler version
v0.8.9+commit.e5eed63a




EVM Version
london




Verified at
2022-04-09T09:37:15.188164Z

contracts/NFTStoreFrontV1.sol

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

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
import "@openzeppelin/contracts/interfaces/IERC1155.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "./Utils.sol";
import "./PlastikRRGV1.sol";
import "./PlastikNFTV1.sol";
import "./PlastikERC1155V1.sol";

contract NFTStoreFront is Ownable, IERC721Receiver, EIP712 {
    using SafeMath for uint256;
    using SafeMath for uint96;

    // enum BuyingAssetType {
    //     ERC1155,
    //     ERC721
    // }

    // event NgoFee(uint96 sellerFee);
    event PlatformFee(uint96 platformFee);
    event BuyAsset(
        address indexed assetOwner,
        uint256 indexed tokenId,
        uint256 quantity,
        address indexed buyer
    );
    event ExecuteBid(
        address indexed assetOwner,
        uint256 indexed tokenId,
        uint256 quantity,
        address indexed buyer
    );
    // event RecyclingRecoveryCreated(
    //     address assetOwner,
    //     uint256 artTokenId,
    //     uint256[] rrgTokenIds
    // );

    uint96 private platformFeePct;
    // uint96 private ngoFeePct;

    struct Fee {
        uint256 platformFee;
        uint256 ngoFee;
        uint256 assetFee;
        uint256 royaltyFee;
        uint256 price;
        address tokenCreator;
    }

    // /* An ECDSA signature. */
    // struct Sign {
    //     uint8 v;
    //     bytes32 r;
    //     bytes32 s;
    // }

    // struct Order {
    //     address seller;
    //     address buyer;
    //     address erc20Address;
    //     address nftAddress;
    //     BuyingAssetType nftType;
    //     uint256 unitPrice;
    //     uint256 amount;
    //     uint256 tokenId;
    //     uint256 qty;
    // }

    struct PurchaseSignatures {
        bytes artSellSignature;
        bytes artVoucherSignature;
        bytes[] rrgSellSignatures;
        bytes[] rrgSignatures;
    }

    struct SellRequest {
        address tokenAddress;
        uint256 tokenId;
        uint256 price;
        address erc20Address;
        uint96 ngoFeePct;
        address sellerAddress;
    }

    struct BidRequest {
        address tokenAddress;
        uint256 tokenId;
        address erc20Address;
        address sellerAddress;
        address bidderAddress;
        uint256 biddingPrice;
    }

    address platformWalletAddress;
    address ngoWalletAddress;

    constructor(
        address _platformWalletAddress,
        address _ngoWalletAddress,
        uint96 _platformFeePct
    ) Ownable() EIP712("NFTSTOREFRONT", "1.0") {
        platformWalletAddress = _platformWalletAddress;
        ngoWalletAddress = _ngoWalletAddress;
        platformFeePct = _platformFeePct;
    }

    function mixLazyMintedArtAndRRGs(
        PurchaseSignatures calldata purchase,
        SellRequest calldata artSellRequest,
        NFTVoucher calldata artVoucher,
        SellRequest[] calldata rrgSellRequests,
        NFTVoucher[] calldata rrgVouchers
    ) public {
        // verify and transfer art
        address artSeller = _verifySellerSign(
            artSellRequest,
            purchase.artSellSignature
        );
        _verifySellerSellRequest(
            artSeller,
            artSellRequest,
            artVoucher.tokenAddress,
            artVoucher.tokenId
        );

        PlastikNFTV1(artVoucher.tokenAddress).safeLazyMint(
            _msgSender(),
            artVoucher,
            purchase.artVoucherSignature
        );

        Fee memory artFee = getFees(
            artSellRequest.price,
            1,
            artSellRequest.ngoFeePct,
            artSellRequest.tokenAddress,
            artSellRequest.tokenId
        );
        _distributeFee(
            _msgSender(),
            artSellRequest.sellerAddress,
            artSellRequest.erc20Address,
            artFee
        );

        for (uint8 i = 0; i < rrgVouchers.length; i++) {
            uint256 tokenId = PlastikRRGV1(rrgVouchers[i].tokenAddress)
                .safeLazyMint(
                    _msgSender(),
                    rrgVouchers[i],
                    purchase.rrgSignatures[i]
                );

            PlastikRRGV1(rrgVouchers[i].tokenAddress).attachRRGToArt(
                _msgSender(),
                tokenId,
                artVoucher.tokenAddress,
                artVoucher.tokenId
            );

            Fee memory fee = getFees(
                rrgSellRequests[i].price,
                1,
                rrgSellRequests[i].ngoFeePct,
                rrgSellRequests[i].tokenAddress,
                rrgSellRequests[i].tokenId
            );
            _distributeFee(
                _msgSender(),
                rrgSellRequests[i].sellerAddress,
                rrgSellRequests[i].erc20Address,
                fee
            );
        }
    }

    function mixExistingArtWithLazyMintedRRGs(
        PurchaseSignatures calldata purchase,
        SellRequest calldata artSellRequest,
        SellRequest[] calldata rrgSellRequests,
        NFTVoucher[] calldata rrgVouchers
    ) public {
        require(
            ERC165Checker.supportsInterface(
                artSellRequest.tokenAddress,
                type(IERC721).interfaceId
            ),
            "Only allowed ERC721 tokens"
        );

        // verify and transfer art
        address artSeller = _verifySellerSign(
            artSellRequest,
            purchase.artSellSignature
        );
        _verifySellerSellRequest(
            artSeller,
            artSellRequest,
            artSellRequest.tokenAddress,
            artSellRequest.tokenId
        );
        // the art we are assuming that it was approved to transfer already
        IERC721(artSellRequest.tokenAddress).safeTransferFrom(
            artSellRequest.sellerAddress,
            _msgSender(),
            artSellRequest.tokenId
        );

        Fee memory artFee = getFees(
            artSellRequest.price,
            1,
            artSellRequest.ngoFeePct,
            artSellRequest.tokenAddress,
            artSellRequest.tokenId
        );
        _distributeFee(
            _msgSender(),
            artSellRequest.sellerAddress,
            artSellRequest.erc20Address,
            artFee
        );

        // mint and transfer lazyminted RRG
        for (uint8 i = 0; i < rrgVouchers.length; i++) {
            address rrgSeller = _verifySellerSign(
                rrgSellRequests[i],
                purchase.rrgSellSignatures[i]
            );
            //verify the message against the lazy mint vourcher
            _verifySellerSellRequest(
                rrgSeller,
                rrgSellRequests[i],
                rrgVouchers[i].tokenAddress,
                rrgVouchers[i].tokenId
            );
            uint256 tokenId = PlastikRRGV1(rrgVouchers[i].tokenAddress)
                .safeLazyMint(
                    _msgSender(),
                    rrgVouchers[i],
                    purchase.rrgSignatures[i]
                );

            PlastikRRGV1(rrgVouchers[i].tokenAddress).attachRRGToArt(
                _msgSender(),
                tokenId,
                artSellRequest.tokenAddress,
                artSellRequest.tokenId
            );

            Fee memory fee = getFees(
                rrgSellRequests[i].price,
                1,
                rrgSellRequests[i].ngoFeePct,
                rrgSellRequests[i].tokenAddress,
                rrgSellRequests[i].tokenId
            );
            _distributeFee(
                _msgSender(),
                rrgSellRequests[i].sellerAddress,
                rrgSellRequests[i].erc20Address,
                fee
            );
        }
    }

    function buyLazyMintedRRG(
        SellRequest calldata sellRequest,
        bytes calldata sellSignature,
        NFTVoucher calldata voucher,
        bytes calldata signature
    ) public {
        address seller = _verifySellerSign(sellRequest, sellSignature);
        //verify the message against the lazy mint vourcher
        _verifySellerSellRequest(
            seller,
            sellRequest,
            voucher.tokenAddress,
            voucher.tokenId
        );
        //mint and transfer
        PlastikRRGV1(voucher.tokenAddress).safeLazyMint(
            _msgSender(),
            voucher,
            signature
        );
        Fee memory fee = getFees(
            sellRequest.price,
            1,
            sellRequest.ngoFeePct,
            sellRequest.tokenAddress,
            sellRequest.tokenId
        );
        _distributeFee(
            _msgSender(),
            sellRequest.sellerAddress,
            sellRequest.erc20Address,
            fee
        );
    }

    function buyRRG(
        SellRequest calldata sellRequest,
        bytes calldata sellSignature
    ) public {
        address seller = _verifySellerSign(sellRequest, sellSignature);
        require(seller == sellRequest.sellerAddress, "Invalid seller address");

        IERC721(sellRequest.tokenAddress).safeTransferFrom(
            sellRequest.sellerAddress,
            _msgSender(),
            sellRequest.tokenId
        );
        emit BuyAsset(seller, sellRequest.tokenId, 1, _msgSender());

        Fee memory fee = getFees(
            sellRequest.price,
            1,
            sellRequest.ngoFeePct,
            sellRequest.tokenAddress,
            sellRequest.tokenId
        );
        _distributeFee(
            _msgSender(),
            sellRequest.sellerAddress,
            sellRequest.erc20Address,
            fee
        );
    }

    function _verifySellerSellRequest(
        address seller,
        SellRequest calldata sellRequest,
        address tokenAddress,
        uint256 tokenId
    ) private pure {
        require(seller == sellRequest.sellerAddress, "Invalid seller address");
        require(
            sellRequest.tokenAddress == tokenAddress,
            "Invalid token address"
        );
        require(sellRequest.tokenId == tokenId, "Invalid token id");
    }

    function _verifyBidderBidRequest(
        address bidder,
        BidRequest calldata bidRequest,
        SellRequest calldata sellRequest,
        address tokenAddress,
        uint256 tokenId
    ) private pure {
        require(bidder == bidRequest.bidderAddress, "Invalid bidder address");
        require(
            bidRequest.sellerAddress == sellRequest.sellerAddress,
            "Invalid seller address"
        );
        require(
            bidRequest.erc20Address == sellRequest.erc20Address,
            "Invalid payment token address"
        );
        require(
            bidRequest.tokenAddress == tokenAddress,
            "Invalid token address"
        );
        require(bidRequest.tokenId == tokenId, "Invalid token id");
    }

    function _verifySellerSign(
        SellRequest calldata item,
        bytes calldata signature
    ) private view returns (address) {
        bytes32 digest = _hashTypedDataV4(
            keccak256(
                abi.encode(
                    Constants.SELLREQUEST_TYPEHASH,
                    item.tokenAddress,
                    item.tokenId,
                    item.price,
                    item.erc20Address,
                    item.ngoFeePct,
                    item.sellerAddress
                )
            )
        );
        return ECDSA.recover(digest, signature);
    }

    function _verifyBidderSign(
        BidRequest calldata item,
        bytes calldata signature
    ) private view returns (address) {
        bytes32 digest = _hashTypedDataV4(
            keccak256(
                abi.encode(
                    Constants.BIDREQUEST_TYPEHASH,
                    item.tokenAddress,
                    item.tokenId,
                    item.erc20Address,
                    item.sellerAddress,
                    item.bidderAddress,
                    item.biddingPrice
                )
            )
        );
        return ECDSA.recover(digest, signature);
    }

    function _distributeFee(
        address _buyer,
        address _seller,
        address _erc20Address,
        Fee memory _fee
    ) private {
        IERC20 erc20Address = IERC20(_erc20Address);
        if (_fee.platformFee > 0) {
            require(
                erc20Address.transferFrom(
                    _buyer,
                    platformWalletAddress,
                    _fee.platformFee
                ),
                "failure while transferring"
            );
        }
        if (_fee.ngoFee > 0) {
            require(
                erc20Address.transferFrom(
                    _buyer,
                    ngoWalletAddress,
                    _fee.ngoFee
                ),
                "failure while transferring"
            );
        }
        if (_fee.royaltyFee > 0) {
            require(
                erc20Address.transferFrom(
                    _buyer,
                    _fee.tokenCreator,
                    _fee.royaltyFee
                ),
                "failure while transferring"
            );
        }
        require(
            erc20Address.transferFrom(_buyer, _seller, _fee.assetFee),
            "failure while transferring"
        );
    }

    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external override returns (bytes4) {
        msg.sender.call(data);
        return
            bytes4(
                keccak256("onERC721Received(address,address,uint256,bytes)")
            );
    }

    function platformServiceFee() public view virtual returns (uint96) {
        return platformFeePct;
    }

    // function ngoServiceFee() public view virtual returns (uint96) {
    //     return ngoFeePct;
    // }

    function setPlatformServiceFee(uint96 _platformFee)
        public
        onlyOwner
        returns (bool)
    {
        platformFeePct = _platformFee;
        emit PlatformFee(platformFeePct);
        return true;
    }

    // function setNgoServiceFee(uint96 _sellerFee)
    //     public
    //     onlyOwner
    //     returns (bool)
    // {
    //     ngoFeePct = _sellerFee;
    //     emit NgoFee(ngoFeePct);
    //     return true;
    // }

    // function getSigner(bytes32 hash, Sign memory sign)
    //     internal
    //     pure
    //     returns (address)
    // {
    //     return
    //         ecrecover(
    //             keccak256(
    //                 abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)
    //             ),
    //             sign.v,
    //             sign.r,
    //             sign.s
    //         );
    // }

    // function verifyBuyerSign(
    //     address seller,
    //     uint256 tokenId,
    //     uint256 amount,
    //     address paymentAssetAddress,
    //     address assetAddress,
    //     Sign memory sign
    // ) internal pure {
    //     bytes32 hash = keccak256(
    //         abi.encodePacked(assetAddress, tokenId, paymentAssetAddress, amount)
    //     );
    //     require(
    //         seller == getSigner(hash, sign),
    //         "seller sign verification failed"
    //     );
    // }

    // function verifyPlatformSign(
    //     address buyer,
    //     uint256 tokenId,
    //     uint256 amount,
    //     address paymentAssetAddress,
    //     address assetAddress,
    //     uint256 qty,
    //     Sign memory sign
    // ) internal pure {
    //     bytes32 hash = keccak256(
    //         abi.encodePacked(
    //             assetAddress,
    //             tokenId,
    //             paymentAssetAddress,
    //             amount,
    //             qty
    //         )
    //     );
    //     require(
    //         buyer == getSigner(hash, sign),
    //         "buyer sign verification failed"
    //     );
    // }

    function getFees(
        uint256 price,
        uint256 qty,
        uint96 ngoFeePct,
        address buyingAssetAddress,
        uint256 tokenId
    ) internal view returns (Fee memory) {
        require(
            ngoFeePct.add(platformFeePct) < 10000,
            "Invalid platform fee or NGO fee"
        );
        // require(
        //     ngoFeePct >= platformFeePct,
        //     "NGO fee must be larger than platform fee"
        // );
        uint256 assetFee;
        address creator;
        uint256 royaltyFee;
        uint256 paymentAmt = price * qty;
        uint256 platformFee = paymentAmt.mul(platformFeePct).div(10000);
        uint256 ngoFee = paymentAmt.mul(ngoFeePct).div(10000);
        uint256 amount = paymentAmt.sub(platformFee).sub(ngoFee);

        if (
            ERC165Checker.supportsInterface(
                buyingAssetAddress,
                type(IERC2981).interfaceId
            )
        ) {
            (creator, royaltyFee) = (
                (IERC2981(buyingAssetAddress).royaltyInfo(tokenId, amount))
            );
        }

        assetFee = amount.sub(royaltyFee);
        return Fee(platformFee, ngoFee, assetFee, royaltyFee, amount, creator);
    }

    // function tradeAsset(BidRequest memory bid, Fee memory fee)
    //     internal
    //     virtual
    // {
    //     IERC721(bid.tokenAddress).safeTransferFrom(
    //         bid.sellerAddress,
    //         bid.bidderAddress,
    //         bid.tokenId
    //     );

    //     if (fee.platformFee > 0) {
    //         require(
    //             IERC20(bid.erc20Address).transferFrom(
    //                 bid.bidderAddress,
    //                 platformWalletAddress,
    //                 fee.platformFee
    //             ),
    //             "failure while transferring"
    //         );
    //     }
    //     if (fee.ngoFee > 0) {
    //         require(
    //             IERC20(bid.erc20Address).transferFrom(
    //                 bid.bidderAddress,
    //                 ngoWalletAddress,
    //                 fee.platformFee
    //             ),
    //             "failure while transferring"
    //         );
    //     }
    //     if (fee.royaltyFee > 0) {
    //         require(
    //             IERC20(bid.erc20Address).transferFrom(
    //                 bid.bidderAddress,
    //                 fee.tokenCreator,
    //                 fee.royaltyFee
    //             ),
    //             "failure while transferring"
    //         );
    //     }
    //     require(
    //         IERC20(bid.erc20Address).transferFrom(
    //             bid.bidderAddress,
    //             bid.sellerAddress,
    //             fee.assetFee
    //         ),
    //         "failure while transferring"
    //     );
    // }

    // function buyAsset(Order memory order, Sign memory sign)
    //     public
    //     returns (bool)
    // {
    //     Fee memory fee = getFees(
    //         order.unitPrice,
    //         order.qty,
    //         order.nftAddress,
    //         order.tokenId
    //     );
    //     require(
    //         (fee.price >= order.unitPrice * order.qty),
    //         "Paid invalid amount"
    //     );
    //     verifyBuyerSign(
    //         order.seller,
    //         order.tokenId,
    //         order.unitPrice,
    //         order.erc20Address,
    //         order.nftAddress,
    //         sign
    //     );
    //     order.buyer = msg.sender;
    //     tradeAsset(order, fee);
    //     emit BuyAsset(order.seller, order.tokenId, order.qty, msg.sender);
    //     return true;
    // }

    function executeBid(
        BidRequest calldata bid,
        bytes calldata bidSignature,
        SellRequest calldata sellRequest,
        bytes calldata sellSignature
    ) public returns (bool) {
        address bidder = _verifyBidderSign(bid, bidSignature);
        _verifyBidderBidRequest(
            bidder,
            bid,
            sellRequest,
            sellRequest.tokenAddress,
            sellRequest.tokenId
        );

        // address seller = _verifySellerSign(sellRequest, sellSignature);
        // _verifySellerSellRequest(
        //     seller,
        //     sellRequest,
        //     bid.tokenAddress,
        //     bid.tokenId
        // );

        IERC721(bid.tokenAddress).safeTransferFrom(
            bid.sellerAddress,
            bid.bidderAddress,
            bid.tokenId
        );

        Fee memory fee = getFees(
            bid.biddingPrice,
            1,
            sellRequest.ngoFeePct,
            bid.tokenAddress,
            bid.tokenId
        );

        _distributeFee(
            bid.bidderAddress,
            bid.sellerAddress,
            sellRequest.erc20Address,
            fee
        );

        emit ExecuteBid(bid.sellerAddress, bid.tokenId, 1, bid.bidderAddress);
        return true;
    }

    function executeBidLazyMintingRRG(
        BidRequest calldata bid,
        bytes calldata bidSignature,
        SellRequest calldata sellRequest,
        bytes calldata sellSignature,
        NFTVoucher calldata voucher,
        bytes calldata signature
    ) public returns (bool) {
        address bidder = _verifyBidderSign(bid, bidSignature);
        _verifyBidderBidRequest(
            bidder,
            bid,
            sellRequest,
            voucher.tokenAddress,
            voucher.tokenId
        );

        address seller = _verifySellerSign(sellRequest, sellSignature);
        _verifySellerSellRequest(
            seller,
            sellRequest,
            bid.tokenAddress,
            bid.tokenId
        );

        PlastikRRGV1(voucher.tokenAddress).safeLazyMint(
            bidder,
            voucher,
            signature
        );

        Fee memory fee = getFees(
            bid.biddingPrice,
            1,
            sellRequest.ngoFeePct,
            sellRequest.tokenAddress,
            sellRequest.tokenId
        );

        _distributeFee(
            bid.bidderAddress,
            seller,
            sellRequest.erc20Address,
            fee
        );
        emit ExecuteBid(bid.sellerAddress, bid.tokenId, 1, bid.bidderAddress);
        return true;
    }
}
        

/_openzeppelin/contracts/access/AccessControl.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

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

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

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

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

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

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

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

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

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

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}
          

/_openzeppelin/contracts/access/AccessControlEnumerable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (access/AccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;

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

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override {
        super._grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override {
        super._revokeRole(role, account);
        _roleMembers[role].remove(account);
    }
}
          

/_openzeppelin/contracts/access/IAccessControl.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

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

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

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

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

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

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

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

/_openzeppelin/contracts/access/IAccessControlEnumerable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}
          

/_openzeppelin/contracts/access/Ownable.sol

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

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

/_openzeppelin/contracts/interfaces/IERC1155.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)

pragma solidity ^0.8.0;

import "../token/ERC1155/IERC1155.sol";
          

/_openzeppelin/contracts/interfaces/IERC165.sol

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

pragma solidity ^0.8.0;

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

/_openzeppelin/contracts/interfaces/IERC2981.sol

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

/_openzeppelin/contracts/interfaces/IERC721.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol)

pragma solidity ^0.8.0;

import "../token/ERC721/IERC721.sol";
          

/_openzeppelin/contracts/security/Pausable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}
          

/_openzeppelin/contracts/token/ERC1155/ERC1155.sol

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

        return batchBalances;
    }

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

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

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

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

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

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data);

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

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

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

        address operator = _msgSender();

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

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

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

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

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

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

        return array;
    }
}
          

/_openzeppelin/contracts/token/ERC1155/IERC1155.sol

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

/_openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol

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

pragma solidity ^0.8.0;

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

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

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

/_openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol

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

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of {ERC1155} that allows token holders to destroy both their
 * own tokens and those that they have been approved to use.
 *
 * _Available since v3.1._
 */
abstract contract ERC1155Burnable is ERC1155 {
    function burn(
        address account,
        uint256 id,
        uint256 value
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );

        _burn(account, id, value);
    }

    function burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory values
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );

        _burnBatch(account, ids, values);
    }
}
          

/_openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol

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

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of ERC1155 that adds tracking of total supply per id.
 *
 * Useful for scenarios where Fungible and Non-fungible tokens have to be
 * clearly identified. Note: While a totalSupply of 1 might mean the
 * corresponding is an NFT, there is no guarantees that no other token with the
 * same id are not going to be minted.
 */
abstract contract ERC1155Supply is ERC1155 {
    mapping(uint256 => uint256) private _totalSupply;

    /**
     * @dev Total amount of tokens in with a given id.
     */
    function totalSupply(uint256 id) public view virtual returns (uint256) {
        return _totalSupply[id];
    }

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

    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);

        if (from == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                _totalSupply[ids[i]] += amounts[i];
            }
        }

        if (to == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                _totalSupply[ids[i]] -= amounts[i];
            }
        }
    }
}
          

/_openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol

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

pragma solidity ^0.8.0;

import "../IERC1155.sol";

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

/_openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

/_openzeppelin/contracts/token/ERC721/ERC721.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

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

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

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

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}
          

/_openzeppelin/contracts/token/ERC721/IERC721.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}
          

/_openzeppelin/contracts/token/ERC721/IERC721Receiver.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}
          

/_openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol

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

pragma solidity ^0.8.0;

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

/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721Burnable is Context, ERC721 {
    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
        _burn(tokenId);
    }
}
          

/_openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol

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

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}
          

/_openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol

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

pragma solidity ^0.8.0;

import "../ERC721.sol";

/**
 * @dev ERC721 token with storage based token URI management.
 */
abstract contract ERC721URIStorage is ERC721 {
    using Strings for uint256;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token");

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(base, _tokenURI));
        }

        return super.tokenURI(tokenId);
    }

    /**
     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual override {
        super._burn(tokenId);

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
}
          

/_openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}
          

/_openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}
          

/_openzeppelin/contracts/token/common/ERC2981.sol

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

        return (royalty.receiver, royaltyAmount);
    }

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

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

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

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

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

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

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

/_openzeppelin/contracts/utils/Address.sol

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}
          

/_openzeppelin/contracts/utils/Context.sol

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

pragma solidity ^0.8.0;

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

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

/_openzeppelin/contracts/utils/Strings.sol

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

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}
          

/_openzeppelin/contracts/utils/cryptography/ECDSA.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}
          

/_openzeppelin/contracts/utils/cryptography/draft-EIP712.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;
    address private immutable _CACHED_THIS;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _CACHED_THIS = address(this);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}
          

/_openzeppelin/contracts/utils/introspection/ERC165.sol

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

/_openzeppelin/contracts/utils/introspection/ERC165Checker.sol

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Library used to query support of an interface declared via {IERC165}.
 *
 * Note that these functions return the actual result of the query: they do not
 * `revert` if an interface is not supported. It is up to the caller to decide
 * what to do in these cases.
 */
library ERC165Checker {
    // As per the EIP-165 spec, no interface should ever match 0xffffffff
    bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;

    /**
     * @dev Returns true if `account` supports the {IERC165} interface,
     */
    function supportsERC165(address account) internal view returns (bool) {
        // Any contract that implements ERC165 must explicitly indicate support of
        // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid
        return
            _supportsERC165Interface(account, type(IERC165).interfaceId) &&
            !_supportsERC165Interface(account, _INTERFACE_ID_INVALID);
    }

    /**
     * @dev Returns true if `account` supports the interface defined by
     * `interfaceId`. Support for {IERC165} itself is queried automatically.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {
        // query support of both ERC165 as per the spec and support of _interfaceId
        return supportsERC165(account) && _supportsERC165Interface(account, interfaceId);
    }

    /**
     * @dev Returns a boolean array where each value corresponds to the
     * interfaces passed in and whether they're supported or not. This allows
     * you to batch check interfaces for a contract where your expectation
     * is that some interfaces may not be supported.
     *
     * See {IERC165-supportsInterface}.
     *
     * _Available since v3.4._
     */
    function getSupportedInterfaces(address account, bytes4[] memory interfaceIds)
        internal
        view
        returns (bool[] memory)
    {
        // an array of booleans corresponding to interfaceIds and whether they're supported or not
        bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);

        // query support of ERC165 itself
        if (supportsERC165(account)) {
            // query support of each interface in interfaceIds
            for (uint256 i = 0; i < interfaceIds.length; i++) {
                interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]);
            }
        }

        return interfaceIdsSupported;
    }

    /**
     * @dev Returns true if `account` supports all the interfaces defined in
     * `interfaceIds`. Support for {IERC165} itself is queried automatically.
     *
     * Batch-querying can lead to gas savings by skipping repeated checks for
     * {IERC165} support.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {
        // query support of ERC165 itself
        if (!supportsERC165(account)) {
            return false;
        }

        // query support of each interface in _interfaceIds
        for (uint256 i = 0; i < interfaceIds.length; i++) {
            if (!_supportsERC165Interface(account, interfaceIds[i])) {
                return false;
            }
        }

        // all interfaces supported
        return true;
    }

    /**
     * @notice Query if a contract implements an interface, does not check ERC165 support
     * @param account The address of the contract to query for support of an interface
     * @param interfaceId The interface identifier, as specified in ERC-165
     * @return true if the contract at account indicates support of the interface with
     * identifier interfaceId, false otherwise
     * @dev Assumes that account contains a contract that supports ERC165, otherwise
     * the behavior of this method is undefined. This precondition can be checked
     * with {supportsERC165}.
     * Interface identification is specified in ERC-165.
     */
    function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {
        bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);
        (bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams);
        if (result.length < 32) return false;
        return success && abi.decode(result, (bool));
    }
}
          

/_openzeppelin/contracts/utils/introspection/IERC165.sol

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

pragma solidity ^0.8.0;

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

/_openzeppelin/contracts/utils/math/SafeMath.sol

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

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}
          

/_openzeppelin/contracts/utils/structs/EnumerableSet.sol

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

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}
          

/contracts/PlastikBaseERC721V1.sol

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

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "hardhat/console.sol";

import "./PlastikCrypto.sol";
import "./PlastikRole.sol";
import "./Utils.sol";
import "./PlastikRoyaltyCal.sol";

/// @custom:security-contact daniel@nozama.green
abstract contract PlastikBaseERC721V1 is
    Ownable,
    ERC721,
    ERC721Enumerable,
    ERC721URIStorage,
    ERC721Burnable,
    IERC2981
{
    string internal __baseURI;
    IPlastikRoyaltyCal internal royaltyCal;
    PlastikCrypto internal plastikCrypto;
    PlastikRole internal plastikRole;

    constructor(
        IPlastikRoyaltyCal _royaltyCal,
        PlastikCrypto _plastikCrypto,
        PlastikRole _plastikRole,
        string memory name,
        string memory symbol
    ) ERC721(name, symbol) {
        __baseURI = Constants.BASE_URI;
        royaltyCal = _royaltyCal;
        plastikCrypto = _plastikCrypto;
        plastikRole = _plastikRole;
    }

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

    function setBaseURI(string memory baseURI_) public onlyOwner {
        __baseURI = baseURI_;
    }

    modifier onlyMinterRole() {
        plastikRole.verifyMinterRole(_msgSender());
        _;
    }

    function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
        external
        view
        virtual
        override
        returns (address, uint256)
    {
        return royaltyCal.royaltyInfo(_tokenId, _salePrice);
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal override(ERC721, ERC721Enumerable) {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    function _burn(uint256 tokenId)
        internal
        virtual
        override(ERC721, ERC721URIStorage)
    {
        super._burn(tokenId);
        royaltyCal.resetTokenRoyalty(tokenId);
    }

    function transferToBuyer(
        address signer,
        address buyer,
        uint256 tokenId
    ) internal {
        // transfer to the buyer
        if (_msgSender() == signer) {
            transferFrom(signer, buyer, tokenId);
        } else {
            this.transferFrom(signer, buyer, tokenId);
        }
    }

    function tokenURI(uint256 tokenId)
        public
        view
        virtual
        override(ERC721, ERC721URIStorage)
        returns (string memory)
    {
        return super.tokenURI(tokenId);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC721, IERC165, ERC721Enumerable)
        returns (bool)
    {
        return
            interfaceId == type(IERC721Metadata).interfaceId ||
            interfaceId == type(IERC721Enumerable).interfaceId ||
            interfaceId == type(IERC2981).interfaceId ||
            super.supportsInterface(interfaceId);
    }
}
          

/contracts/PlastikCrypto.sol

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

import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "./Utils.sol";

contract PlastikCrypto is EIP712 {
    constructor() EIP712("PLASTIK", "1.0") {}

    /// @notice Verifies the signature for a given NFTVoucher, returning the address of the signer.
    /// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
    /// @param voucher An NFTVoucher describing an unminted NFT.
    function verify(NFTVoucher calldata voucher, bytes memory signature)
        public
        view
        returns (address)
    {
        bytes32 digest = _hashTypedDataV4(
            keccak256(
                abi.encode(
                    Constants.NFTVOUCHER_TYPEHASH,
                    voucher.tokenAddress,
                    voucher.tokenId,
                    keccak256(bytes(voucher.tokenURI)),
                    voucher.creatorAddress,
                    voucher.royalty
                )
            )
        );
        return ECDSA.recover(digest, signature);
    }
}
          

/contracts/PlastikERC1155V1.sol

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

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";

/// @custom:security-contact daniel@nozama.green
contract PlastikERC1155V1 is
    Ownable,
    ERC1155,
    ERC2981,
    AccessControl,
    Pausable,
    ERC1155Burnable,
    ERC1155Supply
{
    bytes32 public constant URI_SETTER_ROLE = keccak256("URI_SETTER_ROLE");
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");

    struct Sign {
        uint8 v;
        bytes32 r;
        bytes32 s;
    }

    constructor() ERC1155("https://plastiks.io") {
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _grantRole(URI_SETTER_ROLE, msg.sender);
        _grantRole(PAUSER_ROLE, msg.sender);
        _grantRole(MINTER_ROLE, msg.sender);
    }

    function verifySign(string memory tokenURI, Sign memory sign) internal view {
        bytes32 hash = keccak256(abi.encodePacked(this,tokenURI));
        require(owner() == ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)), sign.v, sign.r, sign.s), "Owner sign verification failed");
    }

    function setURI(string memory newuri) public onlyRole(URI_SETTER_ROLE) {
        _setURI(newuri);
    }

    function pause() public onlyRole(PAUSER_ROLE) {
        _pause();
    }

    function unpause() public onlyRole(PAUSER_ROLE) {
        _unpause();
    }

    function mint(
        address account,
        string memory uri,
        uint256 id,
        uint256 amount,
        uint96 fee,
        Sign memory sign,
        bytes memory data
    ) public onlyRole(MINTER_ROLE) {
        verifySign(uri, sign);
        _mint(account, id, amount, data);
        _setTokenRoyalty(id, account, fee);
    }

    //TODO add fee and royalty
    function mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public onlyRole(MINTER_ROLE) {
        _mintBatch(to, ids, amounts, data);
    }

    
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal override(ERC1155, ERC1155Supply) whenNotPaused {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
    }

    // The following functions are overrides required by Solidity.

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC1155, ERC2981, AccessControl)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }
}
          

/contracts/PlastikNFTV1.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "./Utils.sol";
import "./PlastikBaseERC721V1.sol";

/// @custom:security-contact daniel@nozama.green
contract PlastikNFTV1 is PlastikBaseERC721V1, IPlastikArtLazyMint {
    event PlastikNFTMinted(address mintTo, uint256 tokenId);

    constructor(
        IPlastikRoyaltyCal _royaltyCal,
        PlastikCrypto _plastikCrypto,
        PlastikRole _plastikRole
    )
        PlastikBaseERC721V1(
            _royaltyCal,
            _plastikCrypto,
            _plastikRole,
            "PlastikNFTV1",
            "PLASTIKART"
        )
    {}

    function safeLazyMint(
        address buyer,
        NFTVoucher calldata voucher,
        bytes calldata signature
    ) external payable onlyMinterRole returns (uint256) {
        require(voucher.tokenAddress == address(this), "The voucher must be for this contract");
        // must be compatible with eth_signTypedDataV4 in MetaMask
        address signer = plastikCrypto.verify(voucher, signature);

        require(
            signer == voucher.creatorAddress,
            "Creator Address does not match"
        );

        // mint to signer first to establish on-chain history
        _safeMint(signer, voucher.tokenId);
        _setTokenURI(voucher.tokenId, voucher.tokenURI);

        emit PlastikNFTMinted(signer, voucher.tokenId);

        royaltyCal.setTokenRoyalty(voucher.tokenId, signer, voucher.royalty);

        // transfer to the buyer
        transferToBuyer(signer, buyer, voucher.tokenId);
        return voucher.tokenId;
    }
}
          

/contracts/PlastikRRGV1.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "./Utils.sol";
import "./PlastikBaseERC721V1.sol";
import "./VerifiedAccounts.sol";

/// @custom:security-contact daniel@nozama.green
contract PlastikRRGV1 is PlastikBaseERC721V1, IPlastikRRGLazyMint {
    mapping(uint256 => address) private _attachedRRGToArtAddresss;
    mapping(uint256 => uint256) private _attachedRRGToArtIds;
    mapping(uint256 => bool) private _usedRRG;
    event UseRRG(
        uint256 indexed _tokenId,
        address indexed _owner,
        uint256 indexed _timestamp
    );
    event RRGNFTMinted(address indexed mintTo, uint256 tokenId);
    event TheArtOfRecycling(
        address indexed sustainableUser,
        uint256 tokenId,
        address indexed artAddress,
        uint256 indexed artTokenId
    );

    VerifiedAccounts verifiedAccounts;

    constructor(
        address _addressVerification,
        PlastikRoyaltyCal _royaltyCal,
        PlastikCrypto _plastikCrypto,
        PlastikRole _plastikRole
    )
        PlastikBaseERC721V1(
            _royaltyCal,
            _plastikCrypto,
            _plastikRole,
            "PlastikRRGV1",
            "PLASTIK"
        )
    {
        verifiedAccounts = VerifiedAccounts(_addressVerification);
    }

    function setVerification(address _verifiedAddress)
        public
        onlyOwner
        returns (bool)
    {
        verifiedAccounts = VerifiedAccounts(_verifiedAddress);
        return true;
    }

    function mintRRG(
        uint256 tokenId,
        string memory tokenURI,
        uint96 royalty
    ) external onlyMinterRole returns (uint256) {
        // mint to signer first to establish on-chain history
        _safeMint(_msgSender(), tokenId);
        _setTokenURI(tokenId, tokenURI);

        emit RRGNFTMinted(_msgSender(), tokenId);

        royaltyCal.setTokenRoyalty(tokenId, _msgSender(), royalty);
        return tokenId;
    }

    function safeLazyMint(
        address buyer,
        NFTVoucher calldata voucher,
        bytes memory signature
    ) external payable onlyMinterRole returns (uint256) {
        require(
            voucher.tokenAddress == address(this),
            "The voucher must be for this contract"
        );
        // must be compatible with eth_signTypedDataV4 in MetaMask
        address signer = plastikCrypto.verify(voucher, signature);
        require(
            signer == voucher.creatorAddress,
            "Creator Address does not match"
        );

        //verify if the creator is a verified recycler
        require(
            verifiedAccounts.isVerified(voucher.creatorAddress),
            "Creator is not a verified recycler"
        );

        // mint to signer first to establish on-chain history
        _safeMint(signer, voucher.tokenId);
        _setTokenURI(voucher.tokenId, voucher.tokenURI);

        emit RRGNFTMinted(signer, voucher.tokenId);

        royaltyCal.setTokenRoyalty(voucher.tokenId, buyer, voucher.royalty);

        // transfer to the buyer
        transferToBuyer(signer, buyer, voucher.tokenId);
        return voucher.tokenId;
    }

    function attachRRGToArt(
        address sustainableUser,
        uint256 tokenId,
        address artTokenAddress,
        uint256 artTokenId
    ) public onlyMinterRole {
        require(_attachedRRGToArtIds[tokenId] == 0, "RRG is already attached");
        _attachedRRGToArtAddresss[tokenId] = artTokenAddress;
        _attachedRRGToArtIds[tokenId] = artTokenId;
        emit TheArtOfRecycling(
            sustainableUser,
            tokenId,
            artTokenAddress,
            artTokenId
        );
    }

    function isRRGUsed(uint256 _tokenId) public view returns (bool) {
        return _usedRRG[_tokenId];
    }

    function useRRG(uint256 _tokenId) public returns (bool) {
        require(msg.sender == ownerOf(_tokenId), "Only the owner can use");
        require(!_usedRRG[_tokenId], "RRG is already used");
        _usedRRG[_tokenId] = true;
        emit UseRRG(_tokenId, msg.sender, block.timestamp);
        return true;
    }
}
          

/contracts/PlastikRole.sol

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

import "@openzeppelin/contracts/access/AccessControl.sol";
import "./Utils.sol";

contract PlastikRole is AccessControl {
    constructor() {
        _grantRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _grantRole(Constants.MINTER_ROLE, _msgSender());
    }

    function grantMinterRole(address account) public {
        grantRole(Constants.MINTER_ROLE, account);
    }

    function verifyMinterRole(address account) public view {
        if (!hasRole(Constants.MINTER_ROLE, account)) {
            revert("Only minter role can mint");
        }
    }
}
          

/contracts/PlastikRoyaltyCal.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/common/ERC2981.sol";

interface IPlastikRoyaltyCal is IERC2981 {
    function setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) external;

    function resetTokenRoyalty(uint256 _tokenId) external;
}

contract PlastikRoyaltyCal is ERC2981, IPlastikRoyaltyCal {
    event TokenRoyaltySet(uint256 tokenId, address receiver, uint96 fee);
    event TokenRoyaltyReset(uint256 tokenId);

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

    function resetTokenRoyalty(uint256 tokenId) public {
        super._resetTokenRoyalty(tokenId);
        emit TokenRoyaltyReset(tokenId);
    }
}
          

/contracts/Utils.sol

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

library Constants {
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 constant NFTVOUCHER_TYPEHASH =
        keccak256(
            "NFTVoucher(address tokenAddress,uint256 tokenId,string tokenURI,address creatorAddress,uint96 royalty)"
        );
    bytes32 constant SELLREQUEST_TYPEHASH =
        keccak256(
            "SellRequest(address tokenAddress,uint256 tokenId,uint256 price,address erc20Address,uint96 ngoFeePct,address sellerAddress)"
        );
    bytes32 constant BIDREQUEST_TYPEHASH =
        keccak256(
            "BidRequest(address tokenAddress,uint256 tokenId,address erc20Address,address sellerAddress,address bidderAddress,uint256 biddingPrice)"
        );
    string public constant BASE_URI = "https://plastiks.io/ipfs/";
}

/// @notice Represents an un-minted NFT, which has not yet been recorded into the blockchain. A signed voucher can be redeemed for a real NFT using the redeem function.
struct NFTVoucher {
    /// @notice The address of the ERC721 or ERC1155
    address tokenAddress;
    /// @notice The id of the token to be redeemed. Must be unique - if another token with this ID already exists, the redeem function will revert.
    uint256 tokenId;
    /// @notice The metadata URI to associate with this token.
    string tokenURI;
    /// @notice The address of the original signer of this lazy minting
    address creatorAddress;
    /// @notice The royalty percentage for the original creator (offset 2 digits)
    uint96 royalty;
}

interface IPlastikLazyMint {
    struct ExternalArt {
        uint256 tokenId;
        address tokenAddress;
        address ownerAddress;
    }
}

interface IPlastikArtLazyMint is IPlastikLazyMint {
    function safeLazyMint(
        address buyer,
        NFTVoucher calldata voucher,
        bytes calldata signature
    ) external payable returns (uint256);
}

interface IPlastikRRGLazyMint is IPlastikLazyMint {
    function safeLazyMint(
        address buyer,
        NFTVoucher calldata voucher,
        bytes calldata signature
    ) external payable returns (uint256);
}
          

/contracts/VerifiedAccounts.sol

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

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


contract VerifiedAccounts is Ownable, AccessControlEnumerable {
    bytes32 public constant VALIDATOR_ROLE = keccak256("VALIDATOR_ROLE");
    mapping(address => bool) verifyAddresses;

    event Verified(address indexed _address);
    event Unverified(address indexed _address);

    constructor() Ownable() {
        _setupRole(VALIDATOR_ROLE, _msgSender());
        verifyAddresses[_msgSender()] = true;
    }

    function addVerifyAddress(address _address, bool value) public {
        require(hasRole(VALIDATOR_ROLE, msg.sender), "Only validators can verify");
        verifyAddresses[_address] = value;
        if (value) {
            emit Verified(_address);
        } else {
            emit Unverified(_address);
        }
    }

    function isVerified(address _address) public view returns (bool) {
        return verifyAddresses[_address];
    }
}
          

/hardhat/console.sol

// SPDX-License-Identifier: MIT
pragma solidity >= 0.4.22 <0.9.0;

library console {
	address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);

	function _sendLogPayload(bytes memory payload) private view {
		uint256 payloadLength = payload.length;
		address consoleAddress = CONSOLE_ADDRESS;
		assembly {
			let payloadStart := add(payload, 32)
			let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)
		}
	}

	function log() internal view {
		_sendLogPayload(abi.encodeWithSignature("log()"));
	}

	function logInt(int p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(int)", p0));
	}

	function logUint(uint p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
	}

	function logString(string memory p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
	}

	function logBool(bool p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
	}

	function logAddress(address p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
	}

	function logBytes(bytes memory p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes)", p0));
	}

	function logBytes1(bytes1 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0));
	}

	function logBytes2(bytes2 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0));
	}

	function logBytes3(bytes3 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0));
	}

	function logBytes4(bytes4 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0));
	}

	function logBytes5(bytes5 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0));
	}

	function logBytes6(bytes6 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0));
	}

	function logBytes7(bytes7 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0));
	}

	function logBytes8(bytes8 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0));
	}

	function logBytes9(bytes9 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0));
	}

	function logBytes10(bytes10 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0));
	}

	function logBytes11(bytes11 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0));
	}

	function logBytes12(bytes12 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0));
	}

	function logBytes13(bytes13 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0));
	}

	function logBytes14(bytes14 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0));
	}

	function logBytes15(bytes15 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0));
	}

	function logBytes16(bytes16 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0));
	}

	function logBytes17(bytes17 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0));
	}

	function logBytes18(bytes18 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0));
	}

	function logBytes19(bytes19 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0));
	}

	function logBytes20(bytes20 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0));
	}

	function logBytes21(bytes21 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0));
	}

	function logBytes22(bytes22 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0));
	}

	function logBytes23(bytes23 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0));
	}

	function logBytes24(bytes24 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0));
	}

	function logBytes25(bytes25 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0));
	}

	function logBytes26(bytes26 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0));
	}

	function logBytes27(bytes27 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0));
	}

	function logBytes28(bytes28 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0));
	}

	function logBytes29(bytes29 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0));
	}

	function logBytes30(bytes30 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0));
	}

	function logBytes31(bytes31 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0));
	}

	function logBytes32(bytes32 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0));
	}

	function log(uint p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
	}

	function log(string memory p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
	}

	function log(bool p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
	}

	function log(address p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
	}

	function log(uint p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1));
	}

	function log(uint p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1));
	}

	function log(uint p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1));
	}

	function log(uint p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1));
	}

	function log(string memory p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1));
	}

	function log(string memory p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1));
	}

	function log(string memory p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1));
	}

	function log(string memory p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1));
	}

	function log(bool p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1));
	}

	function log(bool p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1));
	}

	function log(bool p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1));
	}

	function log(bool p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1));
	}

	function log(address p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1));
	}

	function log(address p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1));
	}

	function log(address p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1));
	}

	function log(address p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1));
	}

	function log(uint p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2));
	}

	function log(uint p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2));
	}

	function log(uint p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2));
	}

	function log(uint p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2));
	}

	function log(uint p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2));
	}

	function log(uint p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2));
	}

	function log(uint p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2));
	}

	function log(uint p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2));
	}

	function log(uint p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2));
	}

	function log(uint p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2));
	}

	function log(uint p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2));
	}

	function log(uint p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2));
	}

	function log(string memory p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2));
	}

	function log(string memory p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2));
	}

	function log(string memory p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2));
	}

	function log(string memory p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2));
	}

	function log(bool p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2));
	}

	function log(bool p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2));
	}

	function log(bool p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2));
	}

	function log(bool p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2));
	}

	function log(bool p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2));
	}

	function log(bool p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2));
	}

	function log(bool p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2));
	}

	function log(bool p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2));
	}

	function log(bool p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2));
	}

	function log(bool p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2));
	}

	function log(bool p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2));
	}

	function log(bool p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2));
	}

	function log(address p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2));
	}

	function log(address p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2));
	}

	function log(address p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2));
	}

	function log(address p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2));
	}

	function log(address p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2));
	}

	function log(address p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2));
	}

	function log(address p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2));
	}

	function log(address p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2));
	}

	function log(address p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2));
	}

	function log(address p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2));
	}

	function log(address p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2));
	}

	function log(address p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2));
	}

	function log(address p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2));
	}

	function log(address p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2));
	}

	function log(address p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2));
	}

	function log(address p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2));
	}

	function log(uint p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3));
	}

}
          

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_platformWalletAddress","internalType":"address"},{"type":"address","name":"_ngoWalletAddress","internalType":"address"},{"type":"uint96","name":"_platformFeePct","internalType":"uint96"}]},{"type":"event","name":"BuyAsset","inputs":[{"type":"address","name":"assetOwner","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"uint256","name":"quantity","internalType":"uint256","indexed":false},{"type":"address","name":"buyer","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ExecuteBid","inputs":[{"type":"address","name":"assetOwner","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"uint256","name":"quantity","internalType":"uint256","indexed":false},{"type":"address","name":"buyer","internalType":"address","indexed":true}],"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":"PlatformFee","inputs":[{"type":"uint96","name":"platformFee","internalType":"uint96","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"buyLazyMintedRRG","inputs":[{"type":"tuple","name":"sellRequest","internalType":"struct NFTStoreFront.SellRequest","components":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"price","internalType":"uint256"},{"type":"address","name":"erc20Address","internalType":"address"},{"type":"uint96","name":"ngoFeePct","internalType":"uint96"},{"type":"address","name":"sellerAddress","internalType":"address"}]},{"type":"bytes","name":"sellSignature","internalType":"bytes"},{"type":"tuple","name":"voucher","internalType":"struct NFTVoucher","components":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"string","name":"tokenURI","internalType":"string"},{"type":"address","name":"creatorAddress","internalType":"address"},{"type":"uint96","name":"royalty","internalType":"uint96"}]},{"type":"bytes","name":"signature","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"buyRRG","inputs":[{"type":"tuple","name":"sellRequest","internalType":"struct NFTStoreFront.SellRequest","components":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"price","internalType":"uint256"},{"type":"address","name":"erc20Address","internalType":"address"},{"type":"uint96","name":"ngoFeePct","internalType":"uint96"},{"type":"address","name":"sellerAddress","internalType":"address"}]},{"type":"bytes","name":"sellSignature","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"executeBid","inputs":[{"type":"tuple","name":"bid","internalType":"struct NFTStoreFront.BidRequest","components":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"address","name":"erc20Address","internalType":"address"},{"type":"address","name":"sellerAddress","internalType":"address"},{"type":"address","name":"bidderAddress","internalType":"address"},{"type":"uint256","name":"biddingPrice","internalType":"uint256"}]},{"type":"bytes","name":"bidSignature","internalType":"bytes"},{"type":"tuple","name":"sellRequest","internalType":"struct NFTStoreFront.SellRequest","components":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"price","internalType":"uint256"},{"type":"address","name":"erc20Address","internalType":"address"},{"type":"uint96","name":"ngoFeePct","internalType":"uint96"},{"type":"address","name":"sellerAddress","internalType":"address"}]},{"type":"bytes","name":"sellSignature","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"executeBidLazyMintingRRG","inputs":[{"type":"tuple","name":"bid","internalType":"struct NFTStoreFront.BidRequest","components":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"address","name":"erc20Address","internalType":"address"},{"type":"address","name":"sellerAddress","internalType":"address"},{"type":"address","name":"bidderAddress","internalType":"address"},{"type":"uint256","name":"biddingPrice","internalType":"uint256"}]},{"type":"bytes","name":"bidSignature","internalType":"bytes"},{"type":"tuple","name":"sellRequest","internalType":"struct NFTStoreFront.SellRequest","components":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"price","internalType":"uint256"},{"type":"address","name":"erc20Address","internalType":"address"},{"type":"uint96","name":"ngoFeePct","internalType":"uint96"},{"type":"address","name":"sellerAddress","internalType":"address"}]},{"type":"bytes","name":"sellSignature","internalType":"bytes"},{"type":"tuple","name":"voucher","internalType":"struct NFTVoucher","components":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"string","name":"tokenURI","internalType":"string"},{"type":"address","name":"creatorAddress","internalType":"address"},{"type":"uint96","name":"royalty","internalType":"uint96"}]},{"type":"bytes","name":"signature","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"mixExistingArtWithLazyMintedRRGs","inputs":[{"type":"tuple","name":"purchase","internalType":"struct NFTStoreFront.PurchaseSignatures","components":[{"type":"bytes","name":"artSellSignature","internalType":"bytes"},{"type":"bytes","name":"artVoucherSignature","internalType":"bytes"},{"type":"bytes[]","name":"rrgSellSignatures","internalType":"bytes[]"},{"type":"bytes[]","name":"rrgSignatures","internalType":"bytes[]"}]},{"type":"tuple","name":"artSellRequest","internalType":"struct NFTStoreFront.SellRequest","components":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"price","internalType":"uint256"},{"type":"address","name":"erc20Address","internalType":"address"},{"type":"uint96","name":"ngoFeePct","internalType":"uint96"},{"type":"address","name":"sellerAddress","internalType":"address"}]},{"type":"tuple[]","name":"rrgSellRequests","internalType":"struct NFTStoreFront.SellRequest[]","components":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"price","internalType":"uint256"},{"type":"address","name":"erc20Address","internalType":"address"},{"type":"uint96","name":"ngoFeePct","internalType":"uint96"},{"type":"address","name":"sellerAddress","internalType":"address"}]},{"type":"tuple[]","name":"rrgVouchers","internalType":"struct NFTVoucher[]","components":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"string","name":"tokenURI","internalType":"string"},{"type":"address","name":"creatorAddress","internalType":"address"},{"type":"uint96","name":"royalty","internalType":"uint96"}]}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"mixLazyMintedArtAndRRGs","inputs":[{"type":"tuple","name":"purchase","internalType":"struct NFTStoreFront.PurchaseSignatures","components":[{"type":"bytes","name":"artSellSignature","internalType":"bytes"},{"type":"bytes","name":"artVoucherSignature","internalType":"bytes"},{"type":"bytes[]","name":"rrgSellSignatures","internalType":"bytes[]"},{"type":"bytes[]","name":"rrgSignatures","internalType":"bytes[]"}]},{"type":"tuple","name":"artSellRequest","internalType":"struct NFTStoreFront.SellRequest","components":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"price","internalType":"uint256"},{"type":"address","name":"erc20Address","internalType":"address"},{"type":"uint96","name":"ngoFeePct","internalType":"uint96"},{"type":"address","name":"sellerAddress","internalType":"address"}]},{"type":"tuple","name":"artVoucher","internalType":"struct NFTVoucher","components":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"string","name":"tokenURI","internalType":"string"},{"type":"address","name":"creatorAddress","internalType":"address"},{"type":"uint96","name":"royalty","internalType":"uint96"}]},{"type":"tuple[]","name":"rrgSellRequests","internalType":"struct NFTStoreFront.SellRequest[]","components":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"price","internalType":"uint256"},{"type":"address","name":"erc20Address","internalType":"address"},{"type":"uint96","name":"ngoFeePct","internalType":"uint96"},{"type":"address","name":"sellerAddress","internalType":"address"}]},{"type":"tuple[]","name":"rrgVouchers","internalType":"struct NFTVoucher[]","components":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"string","name":"tokenURI","internalType":"string"},{"type":"address","name":"creatorAddress","internalType":"address"},{"type":"uint96","name":"royalty","internalType":"uint96"}]}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bytes4","name":"","internalType":"bytes4"}],"name":"onERC721Received","inputs":[{"type":"address","name":"operator","internalType":"address"},{"type":"address","name":"from","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint96","name":"","internalType":"uint96"}],"name":"platformServiceFee","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"setPlatformServiceFee","inputs":[{"type":"uint96","name":"_platformFee","internalType":"uint96"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]}]
              

Contract Creation Code

0x6101406040523480156200001257600080fd5b5060405162004bd338038062004bd38339818101604052810190620000389190620003ed565b6040518060400160405280600d81526020017f4e465453544f524546524f4e54000000000000000000000000000000000000008152506040518060400160405280600381526020017f312e300000000000000000000000000000000000000000000000000000000000815250620000c4620000b86200023260201b60201c565b6200023a60201b60201c565b60008280519060200120905060008280519060200120905060007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90508260e081815250508161010081815250504660a081815250506200012d818484620002fe60201b60201c565b608081815250503073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1681525050806101208181525050505050505082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505050620004ed565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600083838346306040516020016200031b95949392919062000490565b6040516020818303038152906040528051906020012090509392505050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200036c826200033f565b9050919050565b6200037e816200035f565b81146200038a57600080fd5b50565b6000815190506200039e8162000373565b92915050565b60006bffffffffffffffffffffffff82169050919050565b620003c781620003a4565b8114620003d357600080fd5b50565b600081519050620003e781620003bc565b92915050565b6000806000606084860312156200040957620004086200033a565b5b600062000419868287016200038d565b93505060206200042c868287016200038d565b92505060406200043f86828701620003d6565b9150509250925092565b6000819050919050565b6200045e8162000449565b82525050565b6000819050919050565b620004798162000464565b82525050565b6200048a816200035f565b82525050565b600060a082019050620004a7600083018862000453565b620004b6602083018762000453565b620004c5604083018662000453565b620004d460608301856200046e565b620004e360808301846200047f565b9695505050505050565b60805160a05160c05160e05161010051610120516146966200053d60003960006127b1015260006127f3015260006127d2015260006127070152600061275d0152600061278601526146966000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80638da5cb5b116100715780638da5cb5b14610179578063a353749314610197578063a8cc00cf146101c7578063bc0a279f146101e3578063e1c3b140146101ff578063f2fde38b1461022f576100b4565b80630cd6375e146100b9578063150b7a02146100d55780631e2f4a2c146101055780632dec66b01461013557806361effef714610153578063715018a61461016f575b600080fd5b6100d360048036038101906100ce9190612da2565b61024b565b005b6100ef60048036038101906100ea9190612f51565b610841565b6040516100fc9190613014565b60405180910390f35b61011f600480360381019061011a919061304e565b6108db565b60405161012c9190613112565b60405180910390f35b61013d610ad6565b60405161014a9190613154565b60405180910390f35b61016d6004803603810190610168919061316f565b610af7565b005b610177610d12565b005b610181610d9a565b60405161018e91906131de565b60405180910390f35b6101b160048036038101906101ac9190613218565b610dc3565b6040516101be9190613112565b60405180910390f35b6101e160048036038101906101dc9190613327565b610fdc565b005b6101fd60048036038101906101f8919061341e565b611489565b005b6102196004803603810190610214919061350f565b6115e4565b6040516102269190613112565b60405180910390f35b6102496004803603810190610244919061353c565b6116ed565b005b610287856000016020810190610261919061353c565b7f80ac58cd000000000000000000000000000000000000000000000000000000006117e5565b6102c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102bd906135c6565b60405180910390fd5b60006102e1868880600001906102dc91906135f5565b61180a565b905061030581878860000160208101906102fb919061353c565b8960200135611912565b856000016020810190610318919061353c565b73ffffffffffffffffffffffffffffffffffffffff166342842e0e8760a0016020810190610346919061353c565b61034e611a5e565b89602001356040518463ffffffff1660e01b815260040161037193929190613667565b600060405180830381600087803b15801561038b57600080fd5b505af115801561039f573d6000803e3d6000fd5b5050505060006103df876040013560018960800160208101906103c2919061350f565b8a60000160208101906103d5919061353c565b8b60200135611a66565b90506104186103ec611a5e565b8860a00160208101906103ff919061353c565b896060016020810190610412919061353c565b84611cef565b60005b848490508160ff16101561083657600061048588888460ff168181106104445761044361369e565b5b905060c002018b806040019061045a91906136cd565b8560ff1681811061046e5761046d61369e565b5b905060200281019061048091906135f5565b61180a565b90506105128189898560ff168181106104a1576104a061369e565b5b905060c0020188888660ff168181106104bd576104bc61369e565b5b90506020028101906104cf9190613730565b60000160208101906104e1919061353c565b89898760ff168181106104f7576104f661369e565b5b90506020028101906105099190613730565b60200135611912565b600086868460ff1681811061052a5761052961369e565b5b905060200281019061053c9190613730565b600001602081019061054e919061353c565b73ffffffffffffffffffffffffffffffffffffffff16639bfe7bb7610571611a5e565b89898760ff168181106105875761058661369e565b5b90506020028101906105999190613730565b8e80606001906105a991906136cd565b8860ff168181106105bd576105bc61369e565b5b90506020028101906105cf91906135f5565b6040518563ffffffff1660e01b81526004016105ee9493929190613978565b602060405180830381600087803b15801561060857600080fd5b505af115801561061c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064091906139d4565b905086868460ff168181106106585761065761369e565b5b905060200281019061066a9190613730565b600001602081019061067c919061353c565b73ffffffffffffffffffffffffffffffffffffffff1663e2ece3ff61069f611a5e565b838d60000160208101906106b3919061353c565b8e602001356040518563ffffffff1660e01b81526004016106d79493929190613a01565b600060405180830381600087803b1580156106f157600080fd5b505af1158015610705573d6000803e3d6000fd5b5050505060006107b18a8a8660ff168181106107245761072361369e565b5b905060c002016040013560018c8c8860ff168181106107465761074561369e565b5b905060c00201608001602081019061075e919061350f565b8d8d8960ff168181106107745761077361369e565b5b905060c00201600001602081019061078c919061353c565b8e8e8a60ff168181106107a2576107a161369e565b5b905060c0020160200135611a66565b90506108206107be611a5e565b8b8b8760ff168181106107d4576107d361369e565b5b905060c0020160a00160208101906107ec919061353c565b8c8c8860ff168181106108025761080161369e565b5b905060c00201606001602081019061081a919061353c565b84611cef565b505050808061082e90613a82565b91505061041b565b505050505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff16838360405161086a929190613adc565b6000604051808303816000865af19150503d80600081146108a7576040519150601f19603f3d011682016040523d82523d6000602084013e6108ac565b606091505b5050507f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f905095945050505050565b6000806108e98888886120b5565b905061090e818987886000016020810190610904919061353c565b89602001356121bd565b876000016020810190610921919061353c565b73ffffffffffffffffffffffffffffffffffffffff166342842e0e89606001602081019061094f919061353c565b8a6080016020810190610962919061353c565b8b602001356040518463ffffffff1660e01b815260040161098593929190613667565b600060405180830381600087803b15801561099f57600080fd5b505af11580156109b3573d6000803e3d6000fd5b5050505060006109f38960a0013560018860800160208101906109d6919061350f565b8c60000160208101906109e9919061353c565b8d60200135611a66565b9050610a37896080016020810190610a0b919061353c565b8a6060016020810190610a1e919061353c565b886060016020810190610a31919061353c565b84611cef565b886080016020810190610a4a919061353c565b73ffffffffffffffffffffffffffffffffffffffff1689602001358a6060016020810190610a78919061353c565b73ffffffffffffffffffffffffffffffffffffffff167fec34853c156da04e4792f1c735112ae54e5ed52bac58db5014b26746f306a3626001604051610abe9190613b3a565b60405180910390a46001925050509695505050505050565b60008060149054906101000a90046bffffffffffffffffffffffff16905090565b6000610b0484848461180a565b90508360a0016020810190610b19919061353c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7d90613ba1565b60405180910390fd5b836000016020810190610b99919061353c565b73ffffffffffffffffffffffffffffffffffffffff166342842e0e8560a0016020810190610bc7919061353c565b610bcf611a5e565b87602001356040518463ffffffff1660e01b8152600401610bf293929190613667565b600060405180830381600087803b158015610c0c57600080fd5b505af1158015610c20573d6000803e3d6000fd5b50505050610c2c611a5e565b73ffffffffffffffffffffffffffffffffffffffff1684602001358273ffffffffffffffffffffffffffffffffffffffff167fb10197cef009fd301a90b892d25451c22c3701eb18ee2df1250d31e514fff3946001604051610c8e9190613b3a565b60405180910390a46000610cd285604001356001876080016020810190610cb5919061350f565b886000016020810190610cc8919061353c565b8960200135611a66565b9050610d0b610cdf611a5e565b8660a0016020810190610cf2919061353c565b876060016020810190610d05919061353c565b84611cef565b5050505050565b610d1a611a5e565b73ffffffffffffffffffffffffffffffffffffffff16610d38610d9a565b73ffffffffffffffffffffffffffffffffffffffff1614610d8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8590613c0d565b60405180910390fd5b610d98600061242e565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080610dd18b8b8b6120b5565b9050610df6818c8a886000016020810190610dec919061353c565b89602001356121bd565b6000610e0389898961180a565b9050610e27818a8e6000016020810190610e1d919061353c565b8f60200135611912565b856000016020810190610e3a919061353c565b73ffffffffffffffffffffffffffffffffffffffff16639bfe7bb7838888886040518563ffffffff1660e01b8152600401610e789493929190613978565b602060405180830381600087803b158015610e9257600080fd5b505af1158015610ea6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eca91906139d4565b506000610f078d60a0013560018c6080016020810190610eea919061350f565b8d6000016020810190610efd919061353c565b8e60200135611a66565b9050610f398d6080016020810190610f1f919061353c565b838c6060016020810190610f33919061353c565b84611cef565b8c6080016020810190610f4c919061353c565b73ffffffffffffffffffffffffffffffffffffffff168d602001358e6060016020810190610f7a919061353c565b73ffffffffffffffffffffffffffffffffffffffff167fec34853c156da04e4792f1c735112ae54e5ed52bac58db5014b26746f306a3626001604051610fc09190613b3a565b60405180910390a4600193505050509998505050505050505050565b6000610ff787898060000190610ff291906135f5565b61180a565b905061101b8188886000016020810190611011919061353c565b8960200135611912565b85600001602081019061102e919061353c565b73ffffffffffffffffffffffffffffffffffffffff16639bfe7bb7611051611a5e565b888b806020019061106291906135f5565b6040518563ffffffff1660e01b81526004016110819493929190613978565b602060405180830381600087803b15801561109b57600080fd5b505af11580156110af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d391906139d4565b506000611110886040013560018a60800160208101906110f3919061350f565b8b6000016020810190611106919061353c565b8c60200135611a66565b905061114961111d611a5e565b8960a0016020810190611130919061353c565b8a6060016020810190611143919061353c565b84611cef565b60005b848490508160ff16101561147d57600085858360ff168181106111725761117161369e565b5b90506020028101906111849190613730565b6000016020810190611196919061353c565b73ffffffffffffffffffffffffffffffffffffffff16639bfe7bb76111b9611a5e565b88888660ff168181106111cf576111ce61369e565b5b90506020028101906111e19190613730565b8e80606001906111f191906136cd565b8760ff168181106112055761120461369e565b5b905060200281019061121791906135f5565b6040518563ffffffff1660e01b81526004016112369493929190613978565b602060405180830381600087803b15801561125057600080fd5b505af1158015611264573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128891906139d4565b905085858360ff168181106112a05761129f61369e565b5b90506020028101906112b29190613730565b60000160208101906112c4919061353c565b73ffffffffffffffffffffffffffffffffffffffff1663e2ece3ff6112e7611a5e565b838c60000160208101906112fb919061353c565b8d602001356040518563ffffffff1660e01b815260040161131f9493929190613a01565b600060405180830381600087803b15801561133957600080fd5b505af115801561134d573d6000803e3d6000fd5b5050505060006113f989898560ff1681811061136c5761136b61369e565b5b905060c002016040013560018b8b8760ff1681811061138e5761138d61369e565b5b905060c0020160800160208101906113a6919061350f565b8c8c8860ff168181106113bc576113bb61369e565b5b905060c0020160000160208101906113d4919061353c565b8d8d8960ff168181106113ea576113e961369e565b5b905060c0020160200135611a66565b9050611468611406611a5e565b8a8a8660ff1681811061141c5761141b61369e565b5b905060c0020160a0016020810190611434919061353c565b8b8b8760ff1681811061144a5761144961369e565b5b905060c002016060016020810190611462919061353c565b84611cef565b5050808061147590613a82565b91505061114c565b50505050505050505050565b600061149687878761180a565b90506114ba81888660000160208101906114b0919061353c565b8760200135611912565b8360000160208101906114cd919061353c565b73ffffffffffffffffffffffffffffffffffffffff16639bfe7bb76114f0611a5e565b8686866040518563ffffffff1660e01b81526004016115129493929190613978565b602060405180830381600087803b15801561152c57600080fd5b505af1158015611540573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061156491906139d4565b5060006115a1886040013560018a6080016020810190611584919061350f565b8b6000016020810190611597919061353c565b8c60200135611a66565b90506115da6115ae611a5e565b8960a00160208101906115c1919061353c565b8a60600160208101906115d4919061353c565b84611cef565b5050505050505050565b60006115ee611a5e565b73ffffffffffffffffffffffffffffffffffffffff1661160c610d9a565b73ffffffffffffffffffffffffffffffffffffffff1614611662576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165990613c0d565b60405180910390fd5b81600060146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055507fd93dd360d98fc20e8a1fed3ac984811d257edb945d5612328d87c1123eb42de8600060149054906101000a90046bffffffffffffffffffffffff166040516116dc9190613154565b60405180910390a160019050919050565b6116f5611a5e565b73ffffffffffffffffffffffffffffffffffffffff16611713610d9a565b73ffffffffffffffffffffffffffffffffffffffff1614611769576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161176090613c0d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156117d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d090613c9f565b60405180910390fd5b6117e28161242e565b50565b60006117f0836124f2565b80156118025750611801838361253f565b5b905092915050565b6000806118b87f0227bfb59f2b64de4a76ceeb40f29a3307bf4135abb650aa8d0b824adbe4d673866000016020810190611844919061353c565b87602001358860400135896060016020810190611861919061353c565b8a6080016020810190611874919061350f565b8b60a0016020810190611887919061353c565b60405160200161189d9796959493929190613cd8565b6040516020818303038152906040528051906020012061266a565b90506119088185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612684565b9150509392505050565b8260a0016020810190611925919061353c565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614611992576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198990613ba1565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff168360000160208101906119bc919061353c565b73ffffffffffffffffffffffffffffffffffffffff1614611a12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0990613d93565b60405180910390fd5b80836020013514611a58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4f90613dff565b60405180910390fd5b50505050565b600033905090565b611a6e612c4e565b612710611aba600060149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16866bffffffffffffffffffffffff166126ab90919063ffffffff16565b10611afa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611af190613e6b565b60405180910390fd5b600080600080888a611b0c9190613e8b565b90506000611b5f612710611b51600060149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16856126c190919063ffffffff16565b6126d790919063ffffffff16565b90506000611b98612710611b8a8c6bffffffffffffffffffffffff16866126c190919063ffffffff16565b6126d790919063ffffffff16565b90506000611bc182611bb385876126ed90919063ffffffff16565b6126ed90919063ffffffff16565b9050611bed8a7f2a55205a000000000000000000000000000000000000000000000000000000006117e5565b15611c85578973ffffffffffffffffffffffffffffffffffffffff16632a55205a8a836040518363ffffffff1660e01b8152600401611c2d929190613ee5565b604080518083038186803b158015611c4457600080fd5b505afa158015611c58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7c9190613f23565b80965081975050505b611c9885826126ed90919063ffffffff16565b96506040518060c001604052808481526020018381526020018881526020018681526020018281526020018773ffffffffffffffffffffffffffffffffffffffff1681525097505050505050505095945050505050565b6000829050600082600001511115611df6578073ffffffffffffffffffffffffffffffffffffffff166323b872dd86600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685600001516040518463ffffffff1660e01b8152600401611d6493929190613667565b602060405180830381600087803b158015611d7e57600080fd5b505af1158015611d92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db69190613f8f565b611df5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dec90614008565b60405180910390fd5b5b600082602001511115611ef8578073ffffffffffffffffffffffffffffffffffffffff166323b872dd86600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685602001516040518463ffffffff1660e01b8152600401611e6693929190613667565b602060405180830381600087803b158015611e8057600080fd5b505af1158015611e94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb89190613f8f565b611ef7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eee90614008565b60405180910390fd5b5b600082606001511115611fdc578073ffffffffffffffffffffffffffffffffffffffff166323b872dd868460a0015185606001516040518463ffffffff1660e01b8152600401611f4a93929190613667565b602060405180830381600087803b158015611f6457600080fd5b505af1158015611f78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f9c9190613f8f565b611fdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd290614008565b60405180910390fd5b5b8073ffffffffffffffffffffffffffffffffffffffff166323b872dd868685604001516040518463ffffffff1660e01b815260040161201d93929190613667565b602060405180830381600087803b15801561203757600080fd5b505af115801561204b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061206f9190613f8f565b6120ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120a590614008565b60405180910390fd5b5050505050565b6000806121637ff4b6c9318e472ce88743d274a0fc462a01c286f3d6853c27215e84b55ab878128660000160208101906120ef919061353c565b8760200135886040016020810190612107919061353c565b89606001602081019061211a919061353c565b8a608001602081019061212d919061353c565b8b60a001356040516020016121489796959493929190614028565b6040516020818303038152906040528051906020012061266a565b90506121b38185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612684565b9150509392505050565b8360800160208101906121d0919061353c565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161461223d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612234906140e3565b60405180910390fd5b8260a0016020810190612250919061353c565b73ffffffffffffffffffffffffffffffffffffffff16846060016020810190612279919061353c565b73ffffffffffffffffffffffffffffffffffffffff16146122cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122c690613ba1565b60405180910390fd5b8260600160208101906122e2919061353c565b73ffffffffffffffffffffffffffffffffffffffff1684604001602081019061230b919061353c565b73ffffffffffffffffffffffffffffffffffffffff1614612361576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123589061414f565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1684600001602081019061238b919061353c565b73ffffffffffffffffffffffffffffffffffffffff16146123e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123d890613d93565b60405180910390fd5b80846020013514612427576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161241e90613dff565b60405180910390fd5b5050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600061251e827f01ffc9a70000000000000000000000000000000000000000000000000000000061253f565b801561253857506125368263ffffffff60e01b61253f565b155b9050919050565b6000806301ffc9a760e01b8360405160240161255b9190613014565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000808573ffffffffffffffffffffffffffffffffffffffff16617530846040516125e591906141de565b6000604051808303818686fa925050503d8060008114612621576040519150601f19603f3d011682016040523d82523d6000602084013e612626565b606091505b50915091506020815110156126415760009350505050612664565b81801561265e57508080602001905181019061265d9190613f8f565b5b93505050505b92915050565b600061267d612677612703565b8361281d565b9050919050565b60008060006126938585612850565b915091506126a0816128d3565b819250505092915050565b600081836126b991906141f5565b905092915050565b600081836126cf9190613e8b565b905092915050565b600081836126e5919061427a565b905092915050565b600081836126fb91906142ab565b905092915050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614801561277f57507f000000000000000000000000000000000000000000000000000000000000000046145b156127ac577f0000000000000000000000000000000000000000000000000000000000000000905061281a565b6128177f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612aa8565b90505b90565b60008282604051602001612832929190614357565b60405160208183030381529060405280519060200120905092915050565b6000806041835114156128925760008060006020860151925060408601519150606086015160001a905061288687828585612ae2565b945094505050506128cc565b6040835114156128c35760008060208501519150604085015190506128b8868383612bef565b9350935050506128cc565b60006002915091505b9250929050565b600060048111156128e7576128e661438e565b5b8160048111156128fa576128f961438e565b5b141561290557612aa5565b600160048111156129195761291861438e565b5b81600481111561292c5761292b61438e565b5b141561296d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161296490614409565b60405180910390fd5b600260048111156129815761298061438e565b5b8160048111156129945761299361438e565b5b14156129d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129cc90614475565b60405180910390fd5b600360048111156129e9576129e861438e565b5b8160048111156129fc576129fb61438e565b5b1415612a3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a3490614507565b60405180910390fd5b600480811115612a5057612a4f61438e565b5b816004811115612a6357612a6261438e565b5b1415612aa4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a9b90614599565b60405180910390fd5b5b50565b60008383834630604051602001612ac39594939291906145b9565b6040516020818303038152906040528051906020012090509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115612b1d576000600391509150612be6565b601b8560ff1614158015612b355750601c8560ff1614155b15612b47576000600491509150612be6565b600060018787878760405160008152602001604052604051612b6c949392919061461b565b6020604051602081039080840390855afa158015612b8e573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612bdd57600060019250925050612be6565b80600092509250505b94509492505050565b60008060007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60001b841690506000601b60ff8660001c901c612c3291906141f5565b9050612c4087828885612ae2565b935093505050935093915050565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b600080fd5b600080fd5b600080fd5b600060808284031215612cbf57612cbe612ca4565b5b81905092915050565b600060c08284031215612cde57612cdd612ca4565b5b81905092915050565b600080fd5b600080fd5b600080fd5b60008083601f840112612d0c57612d0b612ce7565b5b8235905067ffffffffffffffff811115612d2957612d28612cec565b5b6020830191508360c0820283011115612d4557612d44612cf1565b5b9250929050565b60008083601f840112612d6257612d61612ce7565b5b8235905067ffffffffffffffff811115612d7f57612d7e612cec565b5b602083019150836020820283011115612d9b57612d9a612cf1565b5b9250929050565b6000806000806000806101208789031215612dc057612dbf612c9a565b5b600087013567ffffffffffffffff811115612dde57612ddd612c9f565b5b612dea89828a01612ca9565b9650506020612dfb89828a01612cc8565b95505060e087013567ffffffffffffffff811115612e1c57612e1b612c9f565b5b612e2889828a01612cf6565b945094505061010087013567ffffffffffffffff811115612e4c57612e4b612c9f565b5b612e5889828a01612d4c565b92509250509295509295509295565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612e9282612e67565b9050919050565b612ea281612e87565b8114612ead57600080fd5b50565b600081359050612ebf81612e99565b92915050565b6000819050919050565b612ed881612ec5565b8114612ee357600080fd5b50565b600081359050612ef581612ecf565b92915050565b60008083601f840112612f1157612f10612ce7565b5b8235905067ffffffffffffffff811115612f2e57612f2d612cec565b5b602083019150836001820283011115612f4a57612f49612cf1565b5b9250929050565b600080600080600060808688031215612f6d57612f6c612c9a565b5b6000612f7b88828901612eb0565b9550506020612f8c88828901612eb0565b9450506040612f9d88828901612ee6565b935050606086013567ffffffffffffffff811115612fbe57612fbd612c9f565b5b612fca88828901612efb565b92509250509295509295909350565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61300e81612fd9565b82525050565b60006020820190506130296000830184613005565b92915050565b600060c0828403121561304557613044612ca4565b5b81905092915050565b6000806000806000806101c0878903121561306c5761306b612c9a565b5b600061307a89828a0161302f565b96505060c087013567ffffffffffffffff81111561309b5761309a612c9f565b5b6130a789828a01612efb565b955095505060e06130ba89828a01612cc8565b9350506101a087013567ffffffffffffffff8111156130dc576130db612c9f565b5b6130e889828a01612efb565b92509250509295509295509295565b60008115159050919050565b61310c816130f7565b82525050565b60006020820190506131276000830184613103565b92915050565b60006bffffffffffffffffffffffff82169050919050565b61314e8161312d565b82525050565b60006020820190506131696000830184613145565b92915050565b600080600060e0848603121561318857613187612c9a565b5b600061319686828701612cc8565b93505060c084013567ffffffffffffffff8111156131b7576131b6612c9f565b5b6131c386828701612efb565b92509250509250925092565b6131d881612e87565b82525050565b60006020820190506131f360008301846131cf565b92915050565b600060a0828403121561320f5761320e612ca4565b5b81905092915050565b60008060008060008060008060006102008a8c03121561323b5761323a612c9a565b5b60006132498c828d0161302f565b99505060c08a013567ffffffffffffffff81111561326a57613269612c9f565b5b6132768c828d01612efb565b985098505060e06132898c828d01612cc8565b9650506101a08a013567ffffffffffffffff8111156132ab576132aa612c9f565b5b6132b78c828d01612efb565b95509550506101c08a013567ffffffffffffffff8111156132db576132da612c9f565b5b6132e78c828d016131f9565b9350506101e08a013567ffffffffffffffff81111561330957613308612c9f565b5b6133158c828d01612efb565b92509250509295985092959850929598565b6000806000806000806000610140888a03121561334757613346612c9a565b5b600088013567ffffffffffffffff81111561336557613364612c9f565b5b6133718a828b01612ca9565b97505060206133828a828b01612cc8565b96505060e088013567ffffffffffffffff8111156133a3576133a2612c9f565b5b6133af8a828b016131f9565b95505061010088013567ffffffffffffffff8111156133d1576133d0612c9f565b5b6133dd8a828b01612cf6565b945094505061012088013567ffffffffffffffff81111561340157613400612c9f565b5b61340d8a828b01612d4c565b925092505092959891949750929550565b600080600080600080610120878903121561343c5761343b612c9a565b5b600061344a89828a01612cc8565b96505060c087013567ffffffffffffffff81111561346b5761346a612c9f565b5b61347789828a01612efb565b955095505060e087013567ffffffffffffffff81111561349a57613499612c9f565b5b6134a689828a016131f9565b93505061010087013567ffffffffffffffff8111156134c8576134c7612c9f565b5b6134d489828a01612efb565b92509250509295509295509295565b6134ec8161312d565b81146134f757600080fd5b50565b600081359050613509816134e3565b92915050565b60006020828403121561352557613524612c9a565b5b6000613533848285016134fa565b91505092915050565b60006020828403121561355257613551612c9a565b5b600061356084828501612eb0565b91505092915050565b600082825260208201905092915050565b7f4f6e6c7920616c6c6f7765642045524337323120746f6b656e73000000000000600082015250565b60006135b0601a83613569565b91506135bb8261357a565b602082019050919050565b600060208201905081810360008301526135df816135a3565b9050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613612576136116135e6565b5b80840192508235915067ffffffffffffffff821115613634576136336135eb565b5b6020830192506001820236038313156136505761364f6135f0565b5b509250929050565b61366181612ec5565b82525050565b600060608201905061367c60008301866131cf565b61368960208301856131cf565b6136966040830184613658565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080833560016020038436030381126136ea576136e96135e6565b5b80840192508235915067ffffffffffffffff82111561370c5761370b6135eb565b5b602083019250602082023603831315613728576137276135f0565b5b509250929050565b60008235600160a00383360303811261374c5761374b6135e6565b5b80830191505092915050565b60006137676020840184612eb0565b905092915050565b61377881612e87565b82525050565b600061378d6020840184612ee6565b905092915050565b61379e81612ec5565b82525050565b600080fd5b600080fd5b600080fd5b600080833560016020038436030381126137d0576137cf6137ae565b5b83810192508235915060208301925067ffffffffffffffff8211156137f8576137f76137a4565b5b60018202360384131561380e5761380d6137a9565b5b509250929050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b60006138538385613816565b9350613860838584613827565b61386983613836565b840190509392505050565b600061388360208401846134fa565b905092915050565b6138948161312d565b82525050565b600060a083016138ad6000840184613758565b6138ba600086018261376f565b506138c8602084018461377e565b6138d56020860182613795565b506138e360408401846137b3565b85830360408701526138f6838284613847565b925050506139076060840184613758565b613914606086018261376f565b506139226080840184613874565b61392f608086018261388b565b508091505092915050565b600082825260208201905092915050565b6000613957838561393a565b9350613964838584613827565b61396d83613836565b840190509392505050565b600060608201905061398d60008301876131cf565b818103602083015261399f818661389a565b905081810360408301526139b481848661394b565b905095945050505050565b6000815190506139ce81612ecf565b92915050565b6000602082840312156139ea576139e9612c9a565b5b60006139f8848285016139bf565b91505092915050565b6000608082019050613a1660008301876131cf565b613a236020830186613658565b613a3060408301856131cf565b613a3d6060830184613658565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600060ff82169050919050565b6000613a8d82613a75565b915060ff821415613aa157613aa0613a46565b5b600182019050919050565b600081905092915050565b6000613ac38385613aac565b9350613ad0838584613827565b82840190509392505050565b6000613ae9828486613ab7565b91508190509392505050565b6000819050919050565b6000819050919050565b6000613b24613b1f613b1a84613af5565b613aff565b612ec5565b9050919050565b613b3481613b09565b82525050565b6000602082019050613b4f6000830184613b2b565b92915050565b7f496e76616c69642073656c6c6572206164647265737300000000000000000000600082015250565b6000613b8b601683613569565b9150613b9682613b55565b602082019050919050565b60006020820190508181036000830152613bba81613b7e565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613bf7602083613569565b9150613c0282613bc1565b602082019050919050565b60006020820190508181036000830152613c2681613bea565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613c89602683613569565b9150613c9482613c2d565b604082019050919050565b60006020820190508181036000830152613cb881613c7c565b9050919050565b6000819050919050565b613cd281613cbf565b82525050565b600060e082019050613ced600083018a613cc9565b613cfa60208301896131cf565b613d076040830188613658565b613d146060830187613658565b613d2160808301866131cf565b613d2e60a0830185613145565b613d3b60c08301846131cf565b98975050505050505050565b7f496e76616c696420746f6b656e20616464726573730000000000000000000000600082015250565b6000613d7d601583613569565b9150613d8882613d47565b602082019050919050565b60006020820190508181036000830152613dac81613d70565b9050919050565b7f496e76616c696420746f6b656e20696400000000000000000000000000000000600082015250565b6000613de9601083613569565b9150613df482613db3565b602082019050919050565b60006020820190508181036000830152613e1881613ddc565b9050919050565b7f496e76616c696420706c6174666f726d20666565206f72204e474f2066656500600082015250565b6000613e55601f83613569565b9150613e6082613e1f565b602082019050919050565b60006020820190508181036000830152613e8481613e48565b9050919050565b6000613e9682612ec5565b9150613ea183612ec5565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613eda57613ed9613a46565b5b828202905092915050565b6000604082019050613efa6000830185613658565b613f076020830184613658565b9392505050565b600081519050613f1d81612e99565b92915050565b60008060408385031215613f3a57613f39612c9a565b5b6000613f4885828601613f0e565b9250506020613f59858286016139bf565b9150509250929050565b613f6c816130f7565b8114613f7757600080fd5b50565b600081519050613f8981613f63565b92915050565b600060208284031215613fa557613fa4612c9a565b5b6000613fb384828501613f7a565b91505092915050565b7f6661696c757265207768696c65207472616e7366657272696e67000000000000600082015250565b6000613ff2601a83613569565b9150613ffd82613fbc565b602082019050919050565b6000602082019050818103600083015261402181613fe5565b9050919050565b600060e08201905061403d600083018a613cc9565b61404a60208301896131cf565b6140576040830188613658565b61406460608301876131cf565b61407160808301866131cf565b61407e60a08301856131cf565b61408b60c0830184613658565b98975050505050505050565b7f496e76616c696420626964646572206164647265737300000000000000000000600082015250565b60006140cd601683613569565b91506140d882614097565b602082019050919050565b600060208201905081810360008301526140fc816140c0565b9050919050565b7f496e76616c6964207061796d656e7420746f6b656e2061646472657373000000600082015250565b6000614139601d83613569565b915061414482614103565b602082019050919050565b600060208201905081810360008301526141688161412c565b9050919050565b600081519050919050565b60005b8381101561419857808201518184015260208101905061417d565b838111156141a7576000848401525b50505050565b60006141b88261416f565b6141c28185613aac565b93506141d281856020860161417a565b80840191505092915050565b60006141ea82846141ad565b915081905092915050565b600061420082612ec5565b915061420b83612ec5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156142405761423f613a46565b5b828201905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061428582612ec5565b915061429083612ec5565b9250826142a05761429f61424b565b5b828204905092915050565b60006142b682612ec5565b91506142c183612ec5565b9250828210156142d4576142d3613a46565b5b828203905092915050565b600081905092915050565b7f1901000000000000000000000000000000000000000000000000000000000000600082015250565b60006143206002836142df565b915061432b826142ea565b600282019050919050565b6000819050919050565b61435161434c82613cbf565b614336565b82525050565b600061436282614313565b915061436e8285614340565b60208201915061437e8284614340565b6020820191508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b60006143f3601883613569565b91506143fe826143bd565b602082019050919050565b60006020820190508181036000830152614422816143e6565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b600061445f601f83613569565b915061446a82614429565b602082019050919050565b6000602082019050818103600083015261448e81614452565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b60006144f1602283613569565b91506144fc82614495565b604082019050919050565b60006020820190508181036000830152614520816144e4565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202776272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000614583602283613569565b915061458e82614527565b604082019050919050565b600060208201905081810360008301526145b281614576565b9050919050565b600060a0820190506145ce6000830188613cc9565b6145db6020830187613cc9565b6145e86040830186613cc9565b6145f56060830185613658565b61460260808301846131cf565b9695505050505050565b61461581613a75565b82525050565b60006080820190506146306000830187613cc9565b61463d602083018661460c565b61464a6040830185613cc9565b6146576060830184613cc9565b9594505050505056fea26469706673582212205dcac9890506d96284d76462b51ab5e0325e2fd173b4cf5269dee5754941aaf164736f6c6343000809003300000000000000000000000022cac6a8e7ff5ce7b35c862cdd5a11c288aef1420000000000000000000000007f451e5ae38647778721f88015e81713c136dc0c00000000000000000000000000000000000000000000000000000000000007d0

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80638da5cb5b116100715780638da5cb5b14610179578063a353749314610197578063a8cc00cf146101c7578063bc0a279f146101e3578063e1c3b140146101ff578063f2fde38b1461022f576100b4565b80630cd6375e146100b9578063150b7a02146100d55780631e2f4a2c146101055780632dec66b01461013557806361effef714610153578063715018a61461016f575b600080fd5b6100d360048036038101906100ce9190612da2565b61024b565b005b6100ef60048036038101906100ea9190612f51565b610841565b6040516100fc9190613014565b60405180910390f35b61011f600480360381019061011a919061304e565b6108db565b60405161012c9190613112565b60405180910390f35b61013d610ad6565b60405161014a9190613154565b60405180910390f35b61016d6004803603810190610168919061316f565b610af7565b005b610177610d12565b005b610181610d9a565b60405161018e91906131de565b60405180910390f35b6101b160048036038101906101ac9190613218565b610dc3565b6040516101be9190613112565b60405180910390f35b6101e160048036038101906101dc9190613327565b610fdc565b005b6101fd60048036038101906101f8919061341e565b611489565b005b6102196004803603810190610214919061350f565b6115e4565b6040516102269190613112565b60405180910390f35b6102496004803603810190610244919061353c565b6116ed565b005b610287856000016020810190610261919061353c565b7f80ac58cd000000000000000000000000000000000000000000000000000000006117e5565b6102c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102bd906135c6565b60405180910390fd5b60006102e1868880600001906102dc91906135f5565b61180a565b905061030581878860000160208101906102fb919061353c565b8960200135611912565b856000016020810190610318919061353c565b73ffffffffffffffffffffffffffffffffffffffff166342842e0e8760a0016020810190610346919061353c565b61034e611a5e565b89602001356040518463ffffffff1660e01b815260040161037193929190613667565b600060405180830381600087803b15801561038b57600080fd5b505af115801561039f573d6000803e3d6000fd5b5050505060006103df876040013560018960800160208101906103c2919061350f565b8a60000160208101906103d5919061353c565b8b60200135611a66565b90506104186103ec611a5e565b8860a00160208101906103ff919061353c565b896060016020810190610412919061353c565b84611cef565b60005b848490508160ff16101561083657600061048588888460ff168181106104445761044361369e565b5b905060c002018b806040019061045a91906136cd565b8560ff1681811061046e5761046d61369e565b5b905060200281019061048091906135f5565b61180a565b90506105128189898560ff168181106104a1576104a061369e565b5b905060c0020188888660ff168181106104bd576104bc61369e565b5b90506020028101906104cf9190613730565b60000160208101906104e1919061353c565b89898760ff168181106104f7576104f661369e565b5b90506020028101906105099190613730565b60200135611912565b600086868460ff1681811061052a5761052961369e565b5b905060200281019061053c9190613730565b600001602081019061054e919061353c565b73ffffffffffffffffffffffffffffffffffffffff16639bfe7bb7610571611a5e565b89898760ff168181106105875761058661369e565b5b90506020028101906105999190613730565b8e80606001906105a991906136cd565b8860ff168181106105bd576105bc61369e565b5b90506020028101906105cf91906135f5565b6040518563ffffffff1660e01b81526004016105ee9493929190613978565b602060405180830381600087803b15801561060857600080fd5b505af115801561061c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064091906139d4565b905086868460ff168181106106585761065761369e565b5b905060200281019061066a9190613730565b600001602081019061067c919061353c565b73ffffffffffffffffffffffffffffffffffffffff1663e2ece3ff61069f611a5e565b838d60000160208101906106b3919061353c565b8e602001356040518563ffffffff1660e01b81526004016106d79493929190613a01565b600060405180830381600087803b1580156106f157600080fd5b505af1158015610705573d6000803e3d6000fd5b5050505060006107b18a8a8660ff168181106107245761072361369e565b5b905060c002016040013560018c8c8860ff168181106107465761074561369e565b5b905060c00201608001602081019061075e919061350f565b8d8d8960ff168181106107745761077361369e565b5b905060c00201600001602081019061078c919061353c565b8e8e8a60ff168181106107a2576107a161369e565b5b905060c0020160200135611a66565b90506108206107be611a5e565b8b8b8760ff168181106107d4576107d361369e565b5b905060c0020160a00160208101906107ec919061353c565b8c8c8860ff168181106108025761080161369e565b5b905060c00201606001602081019061081a919061353c565b84611cef565b505050808061082e90613a82565b91505061041b565b505050505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff16838360405161086a929190613adc565b6000604051808303816000865af19150503d80600081146108a7576040519150601f19603f3d011682016040523d82523d6000602084013e6108ac565b606091505b5050507f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f905095945050505050565b6000806108e98888886120b5565b905061090e818987886000016020810190610904919061353c565b89602001356121bd565b876000016020810190610921919061353c565b73ffffffffffffffffffffffffffffffffffffffff166342842e0e89606001602081019061094f919061353c565b8a6080016020810190610962919061353c565b8b602001356040518463ffffffff1660e01b815260040161098593929190613667565b600060405180830381600087803b15801561099f57600080fd5b505af11580156109b3573d6000803e3d6000fd5b5050505060006109f38960a0013560018860800160208101906109d6919061350f565b8c60000160208101906109e9919061353c565b8d60200135611a66565b9050610a37896080016020810190610a0b919061353c565b8a6060016020810190610a1e919061353c565b886060016020810190610a31919061353c565b84611cef565b886080016020810190610a4a919061353c565b73ffffffffffffffffffffffffffffffffffffffff1689602001358a6060016020810190610a78919061353c565b73ffffffffffffffffffffffffffffffffffffffff167fec34853c156da04e4792f1c735112ae54e5ed52bac58db5014b26746f306a3626001604051610abe9190613b3a565b60405180910390a46001925050509695505050505050565b60008060149054906101000a90046bffffffffffffffffffffffff16905090565b6000610b0484848461180a565b90508360a0016020810190610b19919061353c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7d90613ba1565b60405180910390fd5b836000016020810190610b99919061353c565b73ffffffffffffffffffffffffffffffffffffffff166342842e0e8560a0016020810190610bc7919061353c565b610bcf611a5e565b87602001356040518463ffffffff1660e01b8152600401610bf293929190613667565b600060405180830381600087803b158015610c0c57600080fd5b505af1158015610c20573d6000803e3d6000fd5b50505050610c2c611a5e565b73ffffffffffffffffffffffffffffffffffffffff1684602001358273ffffffffffffffffffffffffffffffffffffffff167fb10197cef009fd301a90b892d25451c22c3701eb18ee2df1250d31e514fff3946001604051610c8e9190613b3a565b60405180910390a46000610cd285604001356001876080016020810190610cb5919061350f565b886000016020810190610cc8919061353c565b8960200135611a66565b9050610d0b610cdf611a5e565b8660a0016020810190610cf2919061353c565b876060016020810190610d05919061353c565b84611cef565b5050505050565b610d1a611a5e565b73ffffffffffffffffffffffffffffffffffffffff16610d38610d9a565b73ffffffffffffffffffffffffffffffffffffffff1614610d8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8590613c0d565b60405180910390fd5b610d98600061242e565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080610dd18b8b8b6120b5565b9050610df6818c8a886000016020810190610dec919061353c565b89602001356121bd565b6000610e0389898961180a565b9050610e27818a8e6000016020810190610e1d919061353c565b8f60200135611912565b856000016020810190610e3a919061353c565b73ffffffffffffffffffffffffffffffffffffffff16639bfe7bb7838888886040518563ffffffff1660e01b8152600401610e789493929190613978565b602060405180830381600087803b158015610e9257600080fd5b505af1158015610ea6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eca91906139d4565b506000610f078d60a0013560018c6080016020810190610eea919061350f565b8d6000016020810190610efd919061353c565b8e60200135611a66565b9050610f398d6080016020810190610f1f919061353c565b838c6060016020810190610f33919061353c565b84611cef565b8c6080016020810190610f4c919061353c565b73ffffffffffffffffffffffffffffffffffffffff168d602001358e6060016020810190610f7a919061353c565b73ffffffffffffffffffffffffffffffffffffffff167fec34853c156da04e4792f1c735112ae54e5ed52bac58db5014b26746f306a3626001604051610fc09190613b3a565b60405180910390a4600193505050509998505050505050505050565b6000610ff787898060000190610ff291906135f5565b61180a565b905061101b8188886000016020810190611011919061353c565b8960200135611912565b85600001602081019061102e919061353c565b73ffffffffffffffffffffffffffffffffffffffff16639bfe7bb7611051611a5e565b888b806020019061106291906135f5565b6040518563ffffffff1660e01b81526004016110819493929190613978565b602060405180830381600087803b15801561109b57600080fd5b505af11580156110af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d391906139d4565b506000611110886040013560018a60800160208101906110f3919061350f565b8b6000016020810190611106919061353c565b8c60200135611a66565b905061114961111d611a5e565b8960a0016020810190611130919061353c565b8a6060016020810190611143919061353c565b84611cef565b60005b848490508160ff16101561147d57600085858360ff168181106111725761117161369e565b5b90506020028101906111849190613730565b6000016020810190611196919061353c565b73ffffffffffffffffffffffffffffffffffffffff16639bfe7bb76111b9611a5e565b88888660ff168181106111cf576111ce61369e565b5b90506020028101906111e19190613730565b8e80606001906111f191906136cd565b8760ff168181106112055761120461369e565b5b905060200281019061121791906135f5565b6040518563ffffffff1660e01b81526004016112369493929190613978565b602060405180830381600087803b15801561125057600080fd5b505af1158015611264573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128891906139d4565b905085858360ff168181106112a05761129f61369e565b5b90506020028101906112b29190613730565b60000160208101906112c4919061353c565b73ffffffffffffffffffffffffffffffffffffffff1663e2ece3ff6112e7611a5e565b838c60000160208101906112fb919061353c565b8d602001356040518563ffffffff1660e01b815260040161131f9493929190613a01565b600060405180830381600087803b15801561133957600080fd5b505af115801561134d573d6000803e3d6000fd5b5050505060006113f989898560ff1681811061136c5761136b61369e565b5b905060c002016040013560018b8b8760ff1681811061138e5761138d61369e565b5b905060c0020160800160208101906113a6919061350f565b8c8c8860ff168181106113bc576113bb61369e565b5b905060c0020160000160208101906113d4919061353c565b8d8d8960ff168181106113ea576113e961369e565b5b905060c0020160200135611a66565b9050611468611406611a5e565b8a8a8660ff1681811061141c5761141b61369e565b5b905060c0020160a0016020810190611434919061353c565b8b8b8760ff1681811061144a5761144961369e565b5b905060c002016060016020810190611462919061353c565b84611cef565b5050808061147590613a82565b91505061114c565b50505050505050505050565b600061149687878761180a565b90506114ba81888660000160208101906114b0919061353c565b8760200135611912565b8360000160208101906114cd919061353c565b73ffffffffffffffffffffffffffffffffffffffff16639bfe7bb76114f0611a5e565b8686866040518563ffffffff1660e01b81526004016115129493929190613978565b602060405180830381600087803b15801561152c57600080fd5b505af1158015611540573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061156491906139d4565b5060006115a1886040013560018a6080016020810190611584919061350f565b8b6000016020810190611597919061353c565b8c60200135611a66565b90506115da6115ae611a5e565b8960a00160208101906115c1919061353c565b8a60600160208101906115d4919061353c565b84611cef565b5050505050505050565b60006115ee611a5e565b73ffffffffffffffffffffffffffffffffffffffff1661160c610d9a565b73ffffffffffffffffffffffffffffffffffffffff1614611662576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165990613c0d565b60405180910390fd5b81600060146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055507fd93dd360d98fc20e8a1fed3ac984811d257edb945d5612328d87c1123eb42de8600060149054906101000a90046bffffffffffffffffffffffff166040516116dc9190613154565b60405180910390a160019050919050565b6116f5611a5e565b73ffffffffffffffffffffffffffffffffffffffff16611713610d9a565b73ffffffffffffffffffffffffffffffffffffffff1614611769576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161176090613c0d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156117d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d090613c9f565b60405180910390fd5b6117e28161242e565b50565b60006117f0836124f2565b80156118025750611801838361253f565b5b905092915050565b6000806118b87f0227bfb59f2b64de4a76ceeb40f29a3307bf4135abb650aa8d0b824adbe4d673866000016020810190611844919061353c565b87602001358860400135896060016020810190611861919061353c565b8a6080016020810190611874919061350f565b8b60a0016020810190611887919061353c565b60405160200161189d9796959493929190613cd8565b6040516020818303038152906040528051906020012061266a565b90506119088185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612684565b9150509392505050565b8260a0016020810190611925919061353c565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614611992576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198990613ba1565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff168360000160208101906119bc919061353c565b73ffffffffffffffffffffffffffffffffffffffff1614611a12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0990613d93565b60405180910390fd5b80836020013514611a58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4f90613dff565b60405180910390fd5b50505050565b600033905090565b611a6e612c4e565b612710611aba600060149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16866bffffffffffffffffffffffff166126ab90919063ffffffff16565b10611afa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611af190613e6b565b60405180910390fd5b600080600080888a611b0c9190613e8b565b90506000611b5f612710611b51600060149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16856126c190919063ffffffff16565b6126d790919063ffffffff16565b90506000611b98612710611b8a8c6bffffffffffffffffffffffff16866126c190919063ffffffff16565b6126d790919063ffffffff16565b90506000611bc182611bb385876126ed90919063ffffffff16565b6126ed90919063ffffffff16565b9050611bed8a7f2a55205a000000000000000000000000000000000000000000000000000000006117e5565b15611c85578973ffffffffffffffffffffffffffffffffffffffff16632a55205a8a836040518363ffffffff1660e01b8152600401611c2d929190613ee5565b604080518083038186803b158015611c4457600080fd5b505afa158015611c58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7c9190613f23565b80965081975050505b611c9885826126ed90919063ffffffff16565b96506040518060c001604052808481526020018381526020018881526020018681526020018281526020018773ffffffffffffffffffffffffffffffffffffffff1681525097505050505050505095945050505050565b6000829050600082600001511115611df6578073ffffffffffffffffffffffffffffffffffffffff166323b872dd86600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685600001516040518463ffffffff1660e01b8152600401611d6493929190613667565b602060405180830381600087803b158015611d7e57600080fd5b505af1158015611d92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db69190613f8f565b611df5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dec90614008565b60405180910390fd5b5b600082602001511115611ef8578073ffffffffffffffffffffffffffffffffffffffff166323b872dd86600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685602001516040518463ffffffff1660e01b8152600401611e6693929190613667565b602060405180830381600087803b158015611e8057600080fd5b505af1158015611e94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb89190613f8f565b611ef7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eee90614008565b60405180910390fd5b5b600082606001511115611fdc578073ffffffffffffffffffffffffffffffffffffffff166323b872dd868460a0015185606001516040518463ffffffff1660e01b8152600401611f4a93929190613667565b602060405180830381600087803b158015611f6457600080fd5b505af1158015611f78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f9c9190613f8f565b611fdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd290614008565b60405180910390fd5b5b8073ffffffffffffffffffffffffffffffffffffffff166323b872dd868685604001516040518463ffffffff1660e01b815260040161201d93929190613667565b602060405180830381600087803b15801561203757600080fd5b505af115801561204b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061206f9190613f8f565b6120ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120a590614008565b60405180910390fd5b5050505050565b6000806121637ff4b6c9318e472ce88743d274a0fc462a01c286f3d6853c27215e84b55ab878128660000160208101906120ef919061353c565b8760200135886040016020810190612107919061353c565b89606001602081019061211a919061353c565b8a608001602081019061212d919061353c565b8b60a001356040516020016121489796959493929190614028565b6040516020818303038152906040528051906020012061266a565b90506121b38185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612684565b9150509392505050565b8360800160208101906121d0919061353c565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161461223d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612234906140e3565b60405180910390fd5b8260a0016020810190612250919061353c565b73ffffffffffffffffffffffffffffffffffffffff16846060016020810190612279919061353c565b73ffffffffffffffffffffffffffffffffffffffff16146122cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122c690613ba1565b60405180910390fd5b8260600160208101906122e2919061353c565b73ffffffffffffffffffffffffffffffffffffffff1684604001602081019061230b919061353c565b73ffffffffffffffffffffffffffffffffffffffff1614612361576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123589061414f565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1684600001602081019061238b919061353c565b73ffffffffffffffffffffffffffffffffffffffff16146123e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123d890613d93565b60405180910390fd5b80846020013514612427576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161241e90613dff565b60405180910390fd5b5050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600061251e827f01ffc9a70000000000000000000000000000000000000000000000000000000061253f565b801561253857506125368263ffffffff60e01b61253f565b155b9050919050565b6000806301ffc9a760e01b8360405160240161255b9190613014565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000808573ffffffffffffffffffffffffffffffffffffffff16617530846040516125e591906141de565b6000604051808303818686fa925050503d8060008114612621576040519150601f19603f3d011682016040523d82523d6000602084013e612626565b606091505b50915091506020815110156126415760009350505050612664565b81801561265e57508080602001905181019061265d9190613f8f565b5b93505050505b92915050565b600061267d612677612703565b8361281d565b9050919050565b60008060006126938585612850565b915091506126a0816128d3565b819250505092915050565b600081836126b991906141f5565b905092915050565b600081836126cf9190613e8b565b905092915050565b600081836126e5919061427a565b905092915050565b600081836126fb91906142ab565b905092915050565b60007f000000000000000000000000029b4665f45b53acb6ba7f54d49c62a832f25cfc73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614801561277f57507f000000000000000000000000000000000000000000000000000000000000a4ec46145b156127ac577ff3e18541d7e94a4f7ba4c8bf713a22fc5356a235b06abf587136fc7812ad2d31905061281a565b6128177f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f6733c731225d42eb85e5bd0ab4cb44b6cc33da50aaf97ab8d9eadd30a19b98607fe6bbd6277e1bf288eed5e8d1780f9a50b239e86b153736bceebccf4ea79d90b3612aa8565b90505b90565b60008282604051602001612832929190614357565b60405160208183030381529060405280519060200120905092915050565b6000806041835114156128925760008060006020860151925060408601519150606086015160001a905061288687828585612ae2565b945094505050506128cc565b6040835114156128c35760008060208501519150604085015190506128b8868383612bef565b9350935050506128cc565b60006002915091505b9250929050565b600060048111156128e7576128e661438e565b5b8160048111156128fa576128f961438e565b5b141561290557612aa5565b600160048111156129195761291861438e565b5b81600481111561292c5761292b61438e565b5b141561296d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161296490614409565b60405180910390fd5b600260048111156129815761298061438e565b5b8160048111156129945761299361438e565b5b14156129d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129cc90614475565b60405180910390fd5b600360048111156129e9576129e861438e565b5b8160048111156129fc576129fb61438e565b5b1415612a3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a3490614507565b60405180910390fd5b600480811115612a5057612a4f61438e565b5b816004811115612a6357612a6261438e565b5b1415612aa4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a9b90614599565b60405180910390fd5b5b50565b60008383834630604051602001612ac39594939291906145b9565b6040516020818303038152906040528051906020012090509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115612b1d576000600391509150612be6565b601b8560ff1614158015612b355750601c8560ff1614155b15612b47576000600491509150612be6565b600060018787878760405160008152602001604052604051612b6c949392919061461b565b6020604051602081039080840390855afa158015612b8e573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612bdd57600060019250925050612be6565b80600092509250505b94509492505050565b60008060007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60001b841690506000601b60ff8660001c901c612c3291906141f5565b9050612c4087828885612ae2565b935093505050935093915050565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b600080fd5b600080fd5b600080fd5b600060808284031215612cbf57612cbe612ca4565b5b81905092915050565b600060c08284031215612cde57612cdd612ca4565b5b81905092915050565b600080fd5b600080fd5b600080fd5b60008083601f840112612d0c57612d0b612ce7565b5b8235905067ffffffffffffffff811115612d2957612d28612cec565b5b6020830191508360c0820283011115612d4557612d44612cf1565b5b9250929050565b60008083601f840112612d6257612d61612ce7565b5b8235905067ffffffffffffffff811115612d7f57612d7e612cec565b5b602083019150836020820283011115612d9b57612d9a612cf1565b5b9250929050565b6000806000806000806101208789031215612dc057612dbf612c9a565b5b600087013567ffffffffffffffff811115612dde57612ddd612c9f565b5b612dea89828a01612ca9565b9650506020612dfb89828a01612cc8565b95505060e087013567ffffffffffffffff811115612e1c57612e1b612c9f565b5b612e2889828a01612cf6565b945094505061010087013567ffffffffffffffff811115612e4c57612e4b612c9f565b5b612e5889828a01612d4c565b92509250509295509295509295565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612e9282612e67565b9050919050565b612ea281612e87565b8114612ead57600080fd5b50565b600081359050612ebf81612e99565b92915050565b6000819050919050565b612ed881612ec5565b8114612ee357600080fd5b50565b600081359050612ef581612ecf565b92915050565b60008083601f840112612f1157612f10612ce7565b5b8235905067ffffffffffffffff811115612f2e57612f2d612cec565b5b602083019150836001820283011115612f4a57612f49612cf1565b5b9250929050565b600080600080600060808688031215612f6d57612f6c612c9a565b5b6000612f7b88828901612eb0565b9550506020612f8c88828901612eb0565b9450506040612f9d88828901612ee6565b935050606086013567ffffffffffffffff811115612fbe57612fbd612c9f565b5b612fca88828901612efb565b92509250509295509295909350565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61300e81612fd9565b82525050565b60006020820190506130296000830184613005565b92915050565b600060c0828403121561304557613044612ca4565b5b81905092915050565b6000806000806000806101c0878903121561306c5761306b612c9a565b5b600061307a89828a0161302f565b96505060c087013567ffffffffffffffff81111561309b5761309a612c9f565b5b6130a789828a01612efb565b955095505060e06130ba89828a01612cc8565b9350506101a087013567ffffffffffffffff8111156130dc576130db612c9f565b5b6130e889828a01612efb565b92509250509295509295509295565b60008115159050919050565b61310c816130f7565b82525050565b60006020820190506131276000830184613103565b92915050565b60006bffffffffffffffffffffffff82169050919050565b61314e8161312d565b82525050565b60006020820190506131696000830184613145565b92915050565b600080600060e0848603121561318857613187612c9a565b5b600061319686828701612cc8565b93505060c084013567ffffffffffffffff8111156131b7576131b6612c9f565b5b6131c386828701612efb565b92509250509250925092565b6131d881612e87565b82525050565b60006020820190506131f360008301846131cf565b92915050565b600060a0828403121561320f5761320e612ca4565b5b81905092915050565b60008060008060008060008060006102008a8c03121561323b5761323a612c9a565b5b60006132498c828d0161302f565b99505060c08a013567ffffffffffffffff81111561326a57613269612c9f565b5b6132768c828d01612efb565b985098505060e06132898c828d01612cc8565b9650506101a08a013567ffffffffffffffff8111156132ab576132aa612c9f565b5b6132b78c828d01612efb565b95509550506101c08a013567ffffffffffffffff8111156132db576132da612c9f565b5b6132e78c828d016131f9565b9350506101e08a013567ffffffffffffffff81111561330957613308612c9f565b5b6133158c828d01612efb565b92509250509295985092959850929598565b6000806000806000806000610140888a03121561334757613346612c9a565b5b600088013567ffffffffffffffff81111561336557613364612c9f565b5b6133718a828b01612ca9565b97505060206133828a828b01612cc8565b96505060e088013567ffffffffffffffff8111156133a3576133a2612c9f565b5b6133af8a828b016131f9565b95505061010088013567ffffffffffffffff8111156133d1576133d0612c9f565b5b6133dd8a828b01612cf6565b945094505061012088013567ffffffffffffffff81111561340157613400612c9f565b5b61340d8a828b01612d4c565b925092505092959891949750929550565b600080600080600080610120878903121561343c5761343b612c9a565b5b600061344a89828a01612cc8565b96505060c087013567ffffffffffffffff81111561346b5761346a612c9f565b5b61347789828a01612efb565b955095505060e087013567ffffffffffffffff81111561349a57613499612c9f565b5b6134a689828a016131f9565b93505061010087013567ffffffffffffffff8111156134c8576134c7612c9f565b5b6134d489828a01612efb565b92509250509295509295509295565b6134ec8161312d565b81146134f757600080fd5b50565b600081359050613509816134e3565b92915050565b60006020828403121561352557613524612c9a565b5b6000613533848285016134fa565b91505092915050565b60006020828403121561355257613551612c9a565b5b600061356084828501612eb0565b91505092915050565b600082825260208201905092915050565b7f4f6e6c7920616c6c6f7765642045524337323120746f6b656e73000000000000600082015250565b60006135b0601a83613569565b91506135bb8261357a565b602082019050919050565b600060208201905081810360008301526135df816135a3565b9050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613612576136116135e6565b5b80840192508235915067ffffffffffffffff821115613634576136336135eb565b5b6020830192506001820236038313156136505761364f6135f0565b5b509250929050565b61366181612ec5565b82525050565b600060608201905061367c60008301866131cf565b61368960208301856131cf565b6136966040830184613658565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080833560016020038436030381126136ea576136e96135e6565b5b80840192508235915067ffffffffffffffff82111561370c5761370b6135eb565b5b602083019250602082023603831315613728576137276135f0565b5b509250929050565b60008235600160a00383360303811261374c5761374b6135e6565b5b80830191505092915050565b60006137676020840184612eb0565b905092915050565b61377881612e87565b82525050565b600061378d6020840184612ee6565b905092915050565b61379e81612ec5565b82525050565b600080fd5b600080fd5b600080fd5b600080833560016020038436030381126137d0576137cf6137ae565b5b83810192508235915060208301925067ffffffffffffffff8211156137f8576137f76137a4565b5b60018202360384131561380e5761380d6137a9565b5b509250929050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b60006138538385613816565b9350613860838584613827565b61386983613836565b840190509392505050565b600061388360208401846134fa565b905092915050565b6138948161312d565b82525050565b600060a083016138ad6000840184613758565b6138ba600086018261376f565b506138c8602084018461377e565b6138d56020860182613795565b506138e360408401846137b3565b85830360408701526138f6838284613847565b925050506139076060840184613758565b613914606086018261376f565b506139226080840184613874565b61392f608086018261388b565b508091505092915050565b600082825260208201905092915050565b6000613957838561393a565b9350613964838584613827565b61396d83613836565b840190509392505050565b600060608201905061398d60008301876131cf565b818103602083015261399f818661389a565b905081810360408301526139b481848661394b565b905095945050505050565b6000815190506139ce81612ecf565b92915050565b6000602082840312156139ea576139e9612c9a565b5b60006139f8848285016139bf565b91505092915050565b6000608082019050613a1660008301876131cf565b613a236020830186613658565b613a3060408301856131cf565b613a3d6060830184613658565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600060ff82169050919050565b6000613a8d82613a75565b915060ff821415613aa157613aa0613a46565b5b600182019050919050565b600081905092915050565b6000613ac38385613aac565b9350613ad0838584613827565b82840190509392505050565b6000613ae9828486613ab7565b91508190509392505050565b6000819050919050565b6000819050919050565b6000613b24613b1f613b1a84613af5565b613aff565b612ec5565b9050919050565b613b3481613b09565b82525050565b6000602082019050613b4f6000830184613b2b565b92915050565b7f496e76616c69642073656c6c6572206164647265737300000000000000000000600082015250565b6000613b8b601683613569565b9150613b9682613b55565b602082019050919050565b60006020820190508181036000830152613bba81613b7e565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613bf7602083613569565b9150613c0282613bc1565b602082019050919050565b60006020820190508181036000830152613c2681613bea565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613c89602683613569565b9150613c9482613c2d565b604082019050919050565b60006020820190508181036000830152613cb881613c7c565b9050919050565b6000819050919050565b613cd281613cbf565b82525050565b600060e082019050613ced600083018a613cc9565b613cfa60208301896131cf565b613d076040830188613658565b613d146060830187613658565b613d2160808301866131cf565b613d2e60a0830185613145565b613d3b60c08301846131cf565b98975050505050505050565b7f496e76616c696420746f6b656e20616464726573730000000000000000000000600082015250565b6000613d7d601583613569565b9150613d8882613d47565b602082019050919050565b60006020820190508181036000830152613dac81613d70565b9050919050565b7f496e76616c696420746f6b656e20696400000000000000000000000000000000600082015250565b6000613de9601083613569565b9150613df482613db3565b602082019050919050565b60006020820190508181036000830152613e1881613ddc565b9050919050565b7f496e76616c696420706c6174666f726d20666565206f72204e474f2066656500600082015250565b6000613e55601f83613569565b9150613e6082613e1f565b602082019050919050565b60006020820190508181036000830152613e8481613e48565b9050919050565b6000613e9682612ec5565b9150613ea183612ec5565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613eda57613ed9613a46565b5b828202905092915050565b6000604082019050613efa6000830185613658565b613f076020830184613658565b9392505050565b600081519050613f1d81612e99565b92915050565b60008060408385031215613f3a57613f39612c9a565b5b6000613f4885828601613f0e565b9250506020613f59858286016139bf565b9150509250929050565b613f6c816130f7565b8114613f7757600080fd5b50565b600081519050613f8981613f63565b92915050565b600060208284031215613fa557613fa4612c9a565b5b6000613fb384828501613f7a565b91505092915050565b7f6661696c757265207768696c65207472616e7366657272696e67000000000000600082015250565b6000613ff2601a83613569565b9150613ffd82613fbc565b602082019050919050565b6000602082019050818103600083015261402181613fe5565b9050919050565b600060e08201905061403d600083018a613cc9565b61404a60208301896131cf565b6140576040830188613658565b61406460608301876131cf565b61407160808301866131cf565b61407e60a08301856131cf565b61408b60c0830184613658565b98975050505050505050565b7f496e76616c696420626964646572206164647265737300000000000000000000600082015250565b60006140cd601683613569565b91506140d882614097565b602082019050919050565b600060208201905081810360008301526140fc816140c0565b9050919050565b7f496e76616c6964207061796d656e7420746f6b656e2061646472657373000000600082015250565b6000614139601d83613569565b915061414482614103565b602082019050919050565b600060208201905081810360008301526141688161412c565b9050919050565b600081519050919050565b60005b8381101561419857808201518184015260208101905061417d565b838111156141a7576000848401525b50505050565b60006141b88261416f565b6141c28185613aac565b93506141d281856020860161417a565b80840191505092915050565b60006141ea82846141ad565b915081905092915050565b600061420082612ec5565b915061420b83612ec5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156142405761423f613a46565b5b828201905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061428582612ec5565b915061429083612ec5565b9250826142a05761429f61424b565b5b828204905092915050565b60006142b682612ec5565b91506142c183612ec5565b9250828210156142d4576142d3613a46565b5b828203905092915050565b600081905092915050565b7f1901000000000000000000000000000000000000000000000000000000000000600082015250565b60006143206002836142df565b915061432b826142ea565b600282019050919050565b6000819050919050565b61435161434c82613cbf565b614336565b82525050565b600061436282614313565b915061436e8285614340565b60208201915061437e8284614340565b6020820191508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b60006143f3601883613569565b91506143fe826143bd565b602082019050919050565b60006020820190508181036000830152614422816143e6565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b600061445f601f83613569565b915061446a82614429565b602082019050919050565b6000602082019050818103600083015261448e81614452565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b60006144f1602283613569565b91506144fc82614495565b604082019050919050565b60006020820190508181036000830152614520816144e4565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202776272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000614583602283613569565b915061458e82614527565b604082019050919050565b600060208201905081810360008301526145b281614576565b9050919050565b600060a0820190506145ce6000830188613cc9565b6145db6020830187613cc9565b6145e86040830186613cc9565b6145f56060830185613658565b61460260808301846131cf565b9695505050505050565b61461581613a75565b82525050565b60006080820190506146306000830187613cc9565b61463d602083018661460c565b61464a6040830185613cc9565b6146576060830184613cc9565b9594505050505056fea26469706673582212205dcac9890506d96284d76462b51ab5e0325e2fd173b4cf5269dee5754941aaf164736f6c63430008090033