creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/misc/AirdropFlashLoanReceiverV3.sol": {
        "content": "// SPDX-License-Identifier: agpl-3.0\npragma solidity 0.8.4;\n\nimport \"../interfaces/IFlashLoanReceiver.sol\";\nimport \"../interfaces/IBNFT.sol\";\nimport \"../interfaces/IBNFTRegistry.sol\";\n\nimport \"./IUserFlashclaimRegistryV3.sol\";\nimport \"./IAirdropFlashLoanReceiverV3.sol\";\n\nimport \"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC721/utils/ERC721HolderUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC1155/utils/ERC1155HolderUpgradeable.sol\";\n\n/**\n * @title Airdrop receiver contract and implement IFlashLoanReceiver interface\n * @author BendDAO\n * @dev implement a flashloan-compatible flashLoanReceiver contract\n **/\ncontract AirdropFlashLoanReceiverV3 is\n  IFlashLoanReceiver,\n  ReentrancyGuardUpgradeable,\n  OwnableUpgradeable,\n  ERC721HolderUpgradeable,\n  ERC1155HolderUpgradeable,\n  IAirdropFlashLoanReceiverV3\n{\n  address public bnftRegistry; // obsolete\n  mapping(bytes32 => bool) public airdropClaimRecords;\n  uint256 public constant override VERSION = 301;\n  address public claimRegistry;\n\n  event ApproveERC20(address indexed token, address indexed spender, uint256 amount);\n  event ApproveERC721(address indexed token, address indexed operator, uint256 amount);\n  event ApproveERC721ForAll(address indexed token, address indexed operator, bool approved);\n  event ApproveERC1155ForAll(address indexed token, address indexed operator, bool approved);\n\n  function initialize(address owner_, address claimRegistry_) public override initializer {\n    __ReentrancyGuard_init();\n    __Ownable_init();\n    __ERC721Holder_init();\n    __ERC1155Holder_init();\n\n    require(owner_ != address(0), \"zero owner address\");\n    require(claimRegistry_ != address(0), \"zero registry address\");\n\n    claimRegistry = claimRegistry_;\n    bnftRegistry = IUserFlashclaimRegistryV3(claimRegistry).getBNFTRegistry();\n\n    _transferOwnership(owner_);\n  }\n\n  struct ExecuteOperationLocalVars {\n    uint256[] airdropTokenTypes;\n    address[] airdropTokenAddresses;\n    uint256[] airdropTokenIds;\n    address airdropContract;\n    bytes airdropParams;\n    uint256 airdropBalance;\n    uint256 airdropTokenId;\n    bytes32 airdropKeyHash;\n    uint256 ethValue;\n  }\n\n  /**\n   * @dev Implement the flash loan receiver interface of boundNFT\n   * @param nftAsset address of original NFT contract\n   * @param nftTokenIds id list of original NFT token\n   * @param initiator address of original msg sender (caller)\n   * @param operator address of bound NFT contract\n   * @param params parameters to call third party contract\n   */\n  function executeOperation(\n    address nftAsset,\n    uint256[] calldata nftTokenIds,\n    address initiator,\n    address operator,\n    bytes calldata params\n  ) external override returns (bool) {\n    ExecuteOperationLocalVars memory vars;\n    address targetOwner = owner();\n\n    require((initiator == targetOwner) || (initiator == claimRegistry), \"invalid initiator\");\n\n    // check caller and owner\n    address bnftRegistry = IUserFlashclaimRegistryV3(claimRegistry).getBNFTRegistry();\n    (address bnftProxy, ) = IBNFTRegistry(bnftRegistry).getBNFTAddresses(nftAsset);\n    require(bnftProxy == msg.sender, \"caller not bnft\");\n\n    require(nftTokenIds.length > 0, \"empty token list\");\n\n    // decode parameters\n    (\n      vars.airdropTokenTypes,\n      vars.airdropTokenAddresses,\n      vars.airdropTokenIds,\n      vars.airdropContract,\n      vars.airdropParams,\n      vars.ethValue\n    ) = abi.decode(params, (uint256[], address[], uint256[], address, bytes, uint256));\n\n    // airdrop token list can be empty, no need transfer immediately after call method\n    // require(vars.airdropTokenTypes.length > 0, \"invalid airdrop token type\");\n    require(vars.airdropTokenAddresses.length == vars.airdropTokenTypes.length, \"invalid airdrop token address length\");\n    require(vars.airdropTokenIds.length == vars.airdropTokenTypes.length, \"invalid airdrop token id length\");\n\n    require(vars.airdropContract != address(0), \"invalid airdrop contract address\");\n    require(vars.airdropParams.length >= 4, \"invalid airdrop parameters\");\n\n    IUserFlashclaimRegistryV3(claimRegistry).validateAirdropCommonAddressess(\n      vars.airdropContract,\n      vars.airdropTokenAddresses\n    );\n\n    // allow operator transfer borrowed nfts back to bnft\n    for (uint256 idIdx = 0; idIdx < nftTokenIds.length; idIdx++) {\n      IERC721Upgradeable(nftAsset).approve(operator, nftTokenIds[idIdx]);\n    }\n\n    // call project aidrop contract\n    AddressUpgradeable.functionCallWithValue(\n      vars.airdropContract,\n      vars.airdropParams,\n      vars.ethValue,\n      \"call airdrop method failed\"\n    );\n\n    vars.airdropKeyHash = getClaimKeyHash(targetOwner, nftAsset, nftTokenIds, params);\n    airdropClaimRecords[vars.airdropKeyHash] = true;\n\n    // transfer airdrop tokens to borrower\n    for (uint256 typeIndex = 0; typeIndex < vars.airdropTokenTypes.length; typeIndex++) {\n      require(vars.airdropTokenAddresses[typeIndex] != address(0), \"invalid airdrop token address\");\n\n      if (vars.airdropTokenTypes[typeIndex] == 1) {\n        // ERC20\n        vars.airdropBalance = IERC20Upgradeable(vars.airdropTokenAddresses[typeIndex]).balanceOf(address(this));\n        if (vars.airdropBalance > 0) {\n          IERC20Upgradeable(vars.airdropTokenAddresses[typeIndex]).transfer(targetOwner, vars.airdropBalance);\n        }\n      } else if (vars.airdropTokenTypes[typeIndex] == 2) {\n        // ERC721 with Enumerate\n        vars.airdropBalance = IERC721Upgradeable(vars.airdropTokenAddresses[typeIndex]).balanceOf(address(this));\n        for (uint256 i = 0; i < vars.airdropBalance; i++) {\n          vars.airdropTokenId = IERC721EnumerableUpgradeable(vars.airdropTokenAddresses[typeIndex]).tokenOfOwnerByIndex(\n            address(this),\n            0\n          );\n          IERC721EnumerableUpgradeable(vars.airdropTokenAddresses[typeIndex]).safeTransferFrom(\n            address(this),\n            targetOwner,\n            vars.airdropTokenId\n          );\n        }\n      } else if (vars.airdropTokenTypes[typeIndex] == 3) {\n        // ERC1155\n        vars.airdropBalance = IERC1155Upgradeable(vars.airdropTokenAddresses[typeIndex]).balanceOf(\n          address(this),\n          vars.airdropTokenIds[typeIndex]\n        );\n        IERC1155Upgradeable(vars.airdropTokenAddresses[typeIndex]).safeTransferFrom(\n          address(this),\n          targetOwner,\n          vars.airdropTokenIds[typeIndex],\n          vars.airdropBalance,\n          new bytes(0)\n        );\n      } else if (vars.airdropTokenTypes[typeIndex] == 4) {\n        // ERC721 without Enumerate but can know the droped token id\n        IERC721EnumerableUpgradeable(vars.airdropTokenAddresses[typeIndex]).safeTransferFrom(\n          address(this),\n          targetOwner,\n          vars.airdropTokenIds[typeIndex]\n        );\n      } else if (vars.airdropTokenTypes[typeIndex] == 5) {\n        // ERC721 without Enumerate and can not know the droped token id\n      }\n    }\n\n    return true;\n  }\n\n  /**\n   * @dev call third party contract method, etc. staking, claim...\n   * @param targetContract address of target contract\n   * @param callParams parameters to call target contract\n   */\n  function callMethod(\n    address targetContract,\n    bytes calldata callParams,\n    uint256 ethValue\n  ) external payable nonReentrant onlyOwner {\n    require(targetContract != address(0), \"invalid contract address\");\n    require(callParams.length >= 4, \"invalid call parameters\");\n\n    require(address(this).balance >= ethValue, \"insufficient eth\");\n\n    IUserFlashclaimRegistryV3(claimRegistry).validateAirdropCommonAddressess(targetContract, new address[](0));\n\n    // call project claim contract\n    AddressUpgradeable.functionCallWithValue(targetContract, callParams, ethValue, \"call method failed\");\n  }\n\n  function approveERC20(\n    address token,\n    address spender,\n    uint256 amount\n  ) external nonReentrant onlyOwner {\n    IUserFlashclaimRegistryV3(claimRegistry).validateAirdropCommonAddressess(spender, new address[](0));\n\n    IERC20Upgradeable(token).approve(spender, amount);\n    emit ApproveERC20(token, spender, amount);\n  }\n\n  /**\n   * @dev transfer ERC20 token from contract to owner\n   * @param token address of ERC20 token\n   * @param amount amount to send\n   */\n  function transferERC20(address token, uint256 amount) external nonReentrant onlyOwner {\n    address to = owner();\n    IERC20Upgradeable(token).transfer(to, amount);\n  }\n\n  function approveERC721(\n    address token,\n    address operator,\n    uint256 tokenId\n  ) external nonReentrant onlyOwner {\n    IUserFlashclaimRegistryV3(claimRegistry).validateAirdropCommonAddressess(operator, new address[](0));\n\n    IERC721Upgradeable(token).approve(operator, tokenId);\n    emit ApproveERC721(token, operator, tokenId);\n  }\n\n  function approveERC721ForAll(\n    address token,\n    address operator,\n    bool approved\n  ) external nonReentrant onlyOwner {\n    IUserFlashclaimRegistryV3(claimRegistry).validateAirdropCommonAddressess(operator, new address[](0));\n\n    IERC721Upgradeable(token).setApprovalForAll(operator, approved);\n    emit ApproveERC721ForAll(token, operator, approved);\n  }\n\n  /**\n   * @dev transfer ERC721 token from contract to owner\n   * @param token address of ERC721 token\n   * @param id token item to send\n   */\n  function transferERC721(address token, uint256 id) external nonReentrant onlyOwner {\n    address to = owner();\n    IERC721Upgradeable(token).safeTransferFrom(address(this), to, id);\n  }\n\n  function approveERC1155ForAll(\n    address token,\n    address operator,\n    bool approved\n  ) external nonReentrant onlyOwner {\n    IUserFlashclaimRegistryV3(claimRegistry).validateAirdropCommonAddressess(operator, new address[](0));\n\n    IERC1155Upgradeable(token).setApprovalForAll(operator, approved);\n    emit ApproveERC1155ForAll(token, operator, approved);\n  }\n\n  /**\n   * @dev transfer ERC1155 token from contract to owner\n   * @param token address of ERC1155 token\n   * @param id token item to send\n   * @param amount amount to send\n   */\n  function transferERC1155(\n    address token,\n    uint256 id,\n    uint256 amount\n  ) external nonReentrant onlyOwner {\n    address to = owner();\n    IERC1155Upgradeable(token).safeTransferFrom(address(this), to, id, amount, new bytes(0));\n  }\n\n  /**\n   * @dev transfer native Ether from contract to owner\n   * @param amount amount to send\n   */\n  function transferEther(uint256 amount) external nonReentrant onlyOwner {\n    address to = owner();\n    (bool success, ) = to.call{value: amount}(new bytes(0));\n    require(success, \"ETH_TRANSFER_FAILED\");\n  }\n\n  /**\n   * @dev query claim record\n   */\n  function getAirdropClaimRecord(\n    address initiator,\n    address nftAsset,\n    uint256[] calldata nftTokenIds,\n    bytes calldata params\n  ) public view returns (bool) {\n    bytes32 airdropKeyHash = getClaimKeyHash(initiator, nftAsset, nftTokenIds, params);\n    return airdropClaimRecords[airdropKeyHash];\n  }\n\n  /**\n   * @dev encode flash claim parameters\n   */\n  function encodeFlashLoanParams(\n    uint256[] calldata airdropTokenTypes,\n    address[] calldata airdropTokenAddresses,\n    uint256[] calldata airdropTokenIds,\n    address airdropContract,\n    bytes calldata airdropParams,\n    uint256 ethValue\n  ) public pure returns (bytes memory) {\n    return\n      abi.encode(airdropTokenTypes, airdropTokenAddresses, airdropTokenIds, airdropContract, airdropParams, ethValue);\n  }\n\n  /**\n   * @dev query claim key hash\n   */\n  function getClaimKeyHash(\n    address initiator,\n    address nftAsset,\n    uint256[] calldata nftTokenIds,\n    bytes calldata params\n  ) public pure returns (bytes32) {\n    return keccak256(abi.encodePacked(initiator, nftAsset, nftTokenIds, params));\n  }\n\n  function getVersion() public view override returns (uint256) {\n    return VERSION;\n  }\n\n  receive() external payable {}\n}\n"
      },
      "contracts/interfaces/IFlashLoanReceiver.sol": {
        "content": "// SPDX-License-Identifier: agpl-3.0\npragma solidity 0.8.4;\n\n/**\n * @title IFlashLoanReceiver interface\n * @notice Interface for the IFlashLoanReceiver.\n * @author BEND\n * @dev implement this interface to develop a flashloan-compatible flashLoanReceiver contract\n **/\ninterface IFlashLoanReceiver {\n  function executeOperation(\n    address asset,\n    uint256[] calldata tokenIds,\n    address initiator,\n    address operator,\n    bytes calldata params\n  ) external returns (bool);\n}\n"
      },
      "contracts/interfaces/IBNFT.sol": {
        "content": "// SPDX-License-Identifier: agpl-3.0\npragma solidity 0.8.4;\n\ninterface IBNFT {\n  /**\n   * @dev Emitted when an bNFT is initialized\n   * @param underlyingAsset_ The address of the underlying asset\n   **/\n  event Initialized(address indexed underlyingAsset_);\n\n  /**\n   * @dev Emitted when the ownership is transferred\n   * @param oldOwner The address of the old owner\n   * @param newOwner The address of the new owner\n   **/\n  event OwnershipTransferred(address oldOwner, address newOwner);\n\n  /**\n   * @dev Emitted when the claim admin is updated\n   * @param oldAdmin The address of the old admin\n   * @param newAdmin The address of the new admin\n   **/\n  event ClaimAdminUpdated(address oldAdmin, address newAdmin);\n\n  /**\n   * @dev Emitted on mint\n   * @param user The address initiating the burn\n   * @param nftAsset address of the underlying asset of NFT\n   * @param nftTokenId token id of the underlying asset of NFT\n   * @param owner The owner address receive the bNFT token\n   **/\n  event Mint(address indexed user, address indexed nftAsset, uint256 nftTokenId, address indexed owner);\n\n  /**\n   * @dev Emitted on burn\n   * @param user The address initiating the burn\n   * @param nftAsset address of the underlying asset of NFT\n   * @param nftTokenId token id of the underlying asset of NFT\n   * @param owner The owner address of the burned bNFT token\n   **/\n  event Burn(address indexed user, address indexed nftAsset, uint256 nftTokenId, address indexed owner);\n\n  /**\n   * @dev Emitted on flashLoan\n   * @param target The address of the flash loan receiver contract\n   * @param initiator The address initiating the flash loan\n   * @param nftAsset address of the underlying asset of NFT\n   * @param tokenId The token id of the asset being flash borrowed\n   **/\n  event FlashLoan(address indexed target, address indexed initiator, address indexed nftAsset, uint256 tokenId);\n\n  event ClaimERC20Airdrop(address indexed token, address indexed to, uint256 amount);\n\n  event ClaimERC721Airdrop(address indexed token, address indexed to, uint256[] ids);\n\n  event ClaimERC1155Airdrop(address indexed token, address indexed to, uint256[] ids, uint256[] amounts, bytes data);\n\n  event ExecuteAirdrop(address indexed airdropContract);\n\n  event FlashLoanApproval(address indexed minter, address indexed operator, bool approved);\n\n  event FlashLoanLocking(uint256 tokenId, address indexed minter, address indexed operator, bool approved);\n\n  /**\n   * @dev Initializes the bNFT\n   * @param underlyingAsset_ The address of the underlying asset of this bNFT (E.g. PUNK for bPUNK)\n   */\n  function initialize(\n    address underlyingAsset_,\n    string calldata bNftName,\n    string calldata bNftSymbol,\n    address owner_,\n    address claimAdmin_,\n    address bnftRegistry_\n  ) external;\n\n  /**\n   * @dev Mints bNFT token to the user address\n   *\n   * Requirements:\n   *  - The caller can be contract address and EOA.\n   *  - `nftTokenId` must not exist.\n   *\n   * @param to The owner address receive the bNFT token\n   * @param tokenId token id of the underlying asset of NFT\n   **/\n  function mint(address to, uint256 tokenId) external;\n\n  /**\n   * @dev Burns user bNFT token\n   *\n   * Requirements:\n   *  - The caller can be contract address and EOA.\n   *  - `tokenId` must exist.\n   *\n   * @param tokenId token id of the underlying asset of NFT\n   **/\n  function burn(uint256 tokenId) external;\n\n  /**\n   * @dev Allows smartcontracts to access the tokens within one transaction, as long as the tokens taken is returned.\n   *\n   * Requirements:\n   *  - `nftTokenIds` must exist.\n   *\n   * @param receiverAddress The address of the contract receiving the tokens, implementing the IFlashLoanReceiver interface\n   * @param nftTokenIds token ids of the underlying asset\n   * @param params Variadic packed params to pass to the receiver as extra information\n   */\n  function flashLoan(\n    address receiverAddress,\n    uint256[] calldata nftTokenIds,\n    bytes calldata params\n  ) external;\n\n  /**\n   * @dev Approve or remove the flash loan `operator` as an operator for the minter.\n   * Operators can call {flashLoan} for any token minted by the minter.\n   *\n   */\n  function setFlashLoanApproval(address operator, bool approved) external;\n\n  /**\n   * @dev Returns if the `operator` is allowed to call flash loan of the assets of `minter`.\n   */\n  function isFlashLoanApproved(address minter, address operator) external view returns (bool);\n\n  /**\n   * @dev Lock or unlock the flash loan `operator` as an operator for the minter.\n   * Operators can call {flashLoan} for any token minted by the minter.\n   *\n   */\n  function setFlashLoanLocking(\n    uint256 tokenId,\n    address operator,\n    bool locked\n  ) external;\n\n  /**\n   * @dev Returns if the `operator` is allowed to call flash loan of the assets of `minter`.\n   */\n  function isFlashLoanLocked(\n    uint256 tokenId,\n    address minter,\n    address operator\n  ) external view returns (bool);\n\n  function getFlashLoanLocked(uint256 tokenId, address minter) external view returns (address[] memory);\n\n  function hasDelegateCashForToken(uint256 tokenId) external view returns (bool);\n\n  function getDelegateCashForToken(uint256 tokenId) external view returns (address[] memory);\n\n  function setDelegateCashForToken(uint256[] calldata tokenIds, bool value) external;\n\n  function setDelegateCashForToken(\n    address delegate,\n    uint256[] calldata tokenIds,\n    bool value\n  ) external;\n\n  function claimERC20Airdrop(\n    address token,\n    address to,\n    uint256 amount\n  ) external;\n\n  function claimERC721Airdrop(\n    address token,\n    address to,\n    uint256[] calldata ids\n  ) external;\n\n  function claimERC1155Airdrop(\n    address token,\n    address to,\n    uint256[] calldata ids,\n    uint256[] calldata amounts,\n    bytes calldata data\n  ) external;\n\n  function executeAirdrop(address airdropContract, bytes calldata airdropParams) external;\n\n  /**\n   * @dev Returns the owner of the `nftTokenId` token.\n   *\n   * Requirements:\n   *  - `tokenId` must exist.\n   *\n   * @param tokenId token id of the underlying asset of NFT\n   */\n  function minterOf(uint256 tokenId) external view returns (address);\n\n  /**\n   * @dev Returns the address of the underlying asset.\n   */\n  function underlyingAsset() external view returns (address);\n\n  /**\n   * @dev Returns the contract-level metadata.\n   */\n  function contractURI() external view returns (string memory);\n}\n"
      },
      "contracts/interfaces/IBNFTRegistry.sol": {
        "content": "// SPDX-License-Identifier: agpl-3.0\npragma solidity 0.8.4;\n\ninterface IBNFTRegistry {\n  event Initialized(address genericImpl, string namePrefix, string symbolPrefix);\n  event GenericImplementationUpdated(address genericImpl);\n  event BNFTCreated(address indexed nftAsset, address bNftImpl, address bNftProxy, uint256 totals);\n  event BNFTUpgraded(address indexed nftAsset, address bNftImpl, address bNftProxy, uint256 totals);\n  event CustomeSymbolsAdded(address[] nftAssets, string[] symbols);\n  event ClaimAdminUpdated(address oldAdmin, address newAdmin);\n  event DelegateCashUpdated(address oldDelegateCash, address newDelegateCash);\n\n  function getBNFTAddresses(address nftAsset) external view returns (address bNftProxy, address bNftImpl);\n\n  function getBNFTAddressesByIndex(uint16 index) external view returns (address bNftProxy, address bNftImpl);\n\n  function getBNFTAssetList() external view returns (address[] memory);\n\n  function allBNFTAssetLength() external view returns (uint256);\n\n  function getDelegateCashContract() external view returns (address);\n\n  function initialize(\n    address genericImpl,\n    string memory namePrefix_,\n    string memory symbolPrefix_\n  ) external;\n\n  function setBNFTGenericImpl(address genericImpl) external;\n\n  /**\n   * @dev Create bNFT proxy and implement, then initialize it\n   * @param nftAsset The address of the underlying asset of the BNFT\n   **/\n  function createBNFT(address nftAsset) external returns (address bNftProxy);\n\n  /**\n   * @dev Create bNFT proxy with already deployed implement, then initialize it\n   * @param nftAsset The address of the underlying asset of the BNFT\n   * @param bNftImpl The address of the deployed implement of the BNFT\n   **/\n  function createBNFTWithImpl(address nftAsset, address bNftImpl) external returns (address bNftProxy);\n\n  /**\n   * @dev Update bNFT proxy to an new deployed implement, then initialize it\n   * @param nftAsset The address of the underlying asset of the BNFT\n   * @param bNftImpl The address of the deployed implement of the BNFT\n   * @param encodedCallData The encoded function call.\n   **/\n  function upgradeBNFTWithImpl(\n    address nftAsset,\n    address bNftImpl,\n    bytes memory encodedCallData\n  ) external;\n\n  function batchUpgradeBNFT(address[] calldata nftAssets) external;\n\n  function batchUpgradeAllBNFT() external;\n\n  /**\n   * @dev Adding custom symbol for some special NFTs like CryptoPunks\n   * @param nftAssets_ The addresses of the NFTs\n   * @param symbols_ The custom symbols of the NFTs\n   **/\n  function addCustomeSymbols(address[] memory nftAssets_, string[] memory symbols_) external;\n}\n"
      },
      "contracts/misc/IUserFlashclaimRegistryV3.sol": {
        "content": "// SPDX-License-Identifier: agpl-3.0\npragma solidity 0.8.4;\n\ninterface IUserFlashclaimRegistryV3 {\n  function createReceiver() external;\n\n  function flashLoan(\n    address nftAsset,\n    uint256[] calldata nftTokenIds,\n    bytes calldata params\n  ) external;\n\n  function getUserReceiver(address user) external view returns (address);\n\n  function getCurrentReceiverVersion() external view returns (uint256);\n\n  function getBNFTRegistry() external view returns (address);\n\n  function validateAirdropCommonAddressess(address airdropContract, address[] calldata airdropTokenAddresses)\n    external\n    view;\n}\n"
      },
      "contracts/misc/IAirdropFlashLoanReceiverV3.sol": {
        "content": "// SPDX-License-Identifier: agpl-3.0\npragma solidity 0.8.4;\n\ninterface IAirdropFlashLoanReceiverV3 {\n  function initialize(address owner_, address claimRegistry_) external;\n\n  function VERSION() external view returns (uint256);\n\n  function getVersion() external view returns (uint256);\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     *\n     * [IMPORTANT]\n     * ====\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\n     *\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n     * constructor.\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length > 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[49] private __gap;\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant _NOT_ENTERED = 1;\n    uint256 private constant _ENTERED = 2;\n\n    uint256 private _status;\n\n    function __ReentrancyGuard_init() internal onlyInitializing {\n        __ReentrancyGuard_init_unchained();\n    }\n\n    function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and making it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        // On the first call to nonReentrant, _notEntered will be true\n        require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n        // Any calls to nonReentrant after this point will fail\n        _status = _ENTERED;\n\n        _;\n\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[49] private __gap;\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `from` to `to` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721Upgradeable is IERC165Upgradeable {\n    /**\n     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n     */\n    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n     */\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    /**\n     * @dev Returns the number of tokens in ``owner``'s account.\n     */\n    function balanceOf(address owner) external view returns (uint256 balance);\n\n    /**\n     * @dev Returns the owner of the `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function ownerOf(uint256 tokenId) external view returns (address owner);\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n     * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external;\n\n    /**\n     * @dev Transfers `tokenId` token from `from` to `to`.\n     *\n     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external;\n\n    /**\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n     * The approval is cleared when the token is transferred.\n     *\n     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n     *\n     * Requirements:\n     *\n     * - The caller must own the token or be an approved operator.\n     * - `tokenId` must exist.\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address to, uint256 tokenId) external;\n\n    /**\n     * @dev Returns the account approved for `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function getApproved(uint256 tokenId) external view returns (address operator);\n\n    /**\n     * @dev Approve or remove `operator` as an operator for the caller.\n     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n     *\n     * Requirements:\n     *\n     * - The `operator` cannot be the caller.\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function setApprovalForAll(address operator, bool _approved) external;\n\n    /**\n     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n     *\n     * See {setApprovalForAll}\n     */\n    function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes calldata data\n    ) external;\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721Upgradeable.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721EnumerableUpgradeable is IERC721Upgradeable {\n    /**\n     * @dev Returns the total amount of tokens stored by the contract.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\n     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\n     */\n    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);\n\n    /**\n     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\n     * Use along with {totalSupply} to enumerate all tokens.\n     */\n    function tokenByIndex(uint256 index) external view returns (uint256);\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/token/ERC721/utils/ERC721HolderUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721ReceiverUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC721Receiver} interface.\n *\n * Accepts all token transfers.\n * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.\n */\ncontract ERC721HolderUpgradeable is Initializable, IERC721ReceiverUpgradeable {\n    function __ERC721Holder_init() internal onlyInitializing {\n    }\n\n    function __ERC721Holder_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {IERC721Receiver-onERC721Received}.\n     *\n     * Always returns `IERC721Receiver.onERC721Received.selector`.\n     */\n    function onERC721Received(\n        address,\n        address,\n        uint256,\n        bytes memory\n    ) public virtual override returns (bytes4) {\n        return this.onERC721Received.selector;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155Upgradeable is IERC165Upgradeable {\n    /**\n     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n     */\n    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n    /**\n     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n     * transfers.\n     */\n    event TransferBatch(\n        address indexed operator,\n        address indexed from,\n        address indexed to,\n        uint256[] ids,\n        uint256[] values\n    );\n\n    /**\n     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n     * `approved`.\n     */\n    event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n    /**\n     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n     *\n     * If an {URI} event was emitted for `id`, the standard\n     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n     * returned by {IERC1155MetadataURI-uri}.\n     */\n    event URI(string value, uint256 indexed id);\n\n    /**\n     * @dev Returns the amount of tokens of token type `id` owned by `account`.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function balanceOf(address account, uint256 id) external view returns (uint256);\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n     *\n     * Requirements:\n     *\n     * - `accounts` and `ids` must have the same length.\n     */\n    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\n        external\n        view\n        returns (uint256[] memory);\n\n    /**\n     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n     *\n     * Emits an {ApprovalForAll} event.\n     *\n     * Requirements:\n     *\n     * - `operator` cannot be the caller.\n     */\n    function setApprovalForAll(address operator, bool approved) external;\n\n    /**\n     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n     *\n     * See {setApprovalForAll}.\n     */\n    function isApprovedForAll(address account, address operator) external view returns (bool);\n\n    /**\n     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n     *\n     * Emits a {TransferSingle} event.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n     * - `from` must have a balance of tokens of type `id` of at least `amount`.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n     * acceptance magic value.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes calldata data\n    ) external;\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n     *\n     * Emits a {TransferBatch} event.\n     *\n     * Requirements:\n     *\n     * - `ids` and `amounts` must have the same length.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n     * acceptance magic value.\n     */\n    function safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] calldata ids,\n        uint256[] calldata amounts,\n        bytes calldata data\n    ) external;\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/token/ERC1155/utils/ERC1155HolderUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ERC1155ReceiverUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.\n *\n * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be\n * stuck.\n *\n * @dev _Available since v3.1._\n */\ncontract ERC1155HolderUpgradeable is Initializable, ERC1155ReceiverUpgradeable {\n    function __ERC1155Holder_init() internal onlyInitializing {\n    }\n\n    function __ERC1155Holder_init_unchained() internal onlyInitializing {\n    }\n    function onERC1155Received(\n        address,\n        address,\n        uint256,\n        uint256,\n        bytes memory\n    ) public virtual override returns (bytes4) {\n        return this.onERC1155Received.selector;\n    }\n\n    function onERC1155BatchReceived(\n        address,\n        address,\n        uint256[] memory,\n        uint256[] memory,\n        bytes memory\n    ) public virtual override returns (bytes4) {\n        return this.onERC1155BatchReceived.selector;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() initializer {}\n * ```\n * ====\n */\nabstract contract Initializable {\n    /**\n     * @dev Indicates that the contract has been initialized.\n     */\n    bool private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Modifier to protect an initializer function from being invoked twice.\n     */\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n    /**\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n     * {initializer} modifier, directly or indirectly.\n     */\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165Upgradeable {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721ReceiverUpgradeable {\n    /**\n     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n     * by `operator` from `from`, this function is called.\n     *\n     * It must return its Solidity selector to confirm the token transfer.\n     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n     *\n     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n     */\n    function onERC721Received(\n        address operator,\n        address from,\n        uint256 tokenId,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155ReceiverUpgradeable.sol\";\nimport \"../../../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\nabstract contract ERC1155ReceiverUpgradeable is Initializable, ERC165Upgradeable, IERC1155ReceiverUpgradeable {\n    function __ERC1155Receiver_init() internal onlyInitializing {\n    }\n\n    function __ERC1155Receiver_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {\n        return interfaceId == type(IERC1155ReceiverUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155ReceiverUpgradeable is IERC165Upgradeable {\n    /**\n     * @dev Handles the receipt of a single ERC1155 token type. This function is\n     * called at the end of a `safeTransferFrom` after the balance has been updated.\n     *\n     * NOTE: To accept the transfer, this must return\n     * `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n     * (i.e. 0xf23a6e61, or its own function selector).\n     *\n     * @param operator The address which initiated the transfer (i.e. msg.sender)\n     * @param from The address which previously owned the token\n     * @param id The ID of the token being transferred\n     * @param value The amount of tokens being transferred\n     * @param data Additional data with no specified format\n     * @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n     */\n    function onERC1155Received(\n        address operator,\n        address from,\n        uint256 id,\n        uint256 value,\n        bytes calldata data\n    ) external returns (bytes4);\n\n    /**\n     * @dev Handles the receipt of a multiple ERC1155 token types. This function\n     * is called at the end of a `safeBatchTransferFrom` after the balances have\n     * been updated.\n     *\n     * NOTE: To accept the transfer(s), this must return\n     * `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n     * (i.e. 0xbc197c81, or its own function selector).\n     *\n     * @param operator The address which initiated the batch transfer (i.e. msg.sender)\n     * @param from The address which previously owned the token\n     * @param ids An array containing ids of each token being transferred (order and length must match values array)\n     * @param values An array containing amounts of each token being transferred (order and length must match ids array)\n     * @param data Additional data with no specified format\n     * @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n     */\n    function onERC1155BatchReceived(\n        address operator,\n        address from,\n        uint256[] calldata ids,\n        uint256[] calldata values,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"
      },
      "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\n    function __ERC165_init() internal onlyInitializing {\n    }\n\n    function __ERC165_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IERC165Upgradeable).interfaceId;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "evmVersion": "istanbul",
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "libraries": {}
    }
  }}