ERC1155ReceiverUpgradeable.sol 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. // SPDX-License-Identifier: MIT
  2. // OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)
  3. pragma solidity ^0.8.0;
  4. import "../IERC1155ReceiverUpgradeable.sol";
  5. import "../../../utils/introspection/ERC165Upgradeable.sol";
  6. import "../../../proxy/utils/Initializable.sol";
  7. /**
  8. * @dev _Available since v3.1._
  9. */
  10. abstract contract ERC1155ReceiverUpgradeable is Initializable, ERC165Upgradeable, IERC1155ReceiverUpgradeable {
  11. function __ERC1155Receiver_init() internal onlyInitializing {
  12. }
  13. function __ERC1155Receiver_init_unchained() internal onlyInitializing {
  14. }
  15. /**
  16. * @dev See {IERC165-supportsInterface}.
  17. */
  18. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {
  19. return interfaceId == type(IERC1155ReceiverUpgradeable).interfaceId || super.supportsInterface(interfaceId);
  20. }
  21. /**
  22. * This empty reserved space is put in place to allow future versions to add new
  23. * variables without shifting down storage in the inheritance chain.
  24. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
  25. */
  26. uint256[50] private __gap;
  27. }