* Clean code - using type().interfaceId to improve readeability of ERC165 registration - hardcoding some keccak256 that are otherwise computed at construction. * hardcode keccak256 result * Improve code readeability using try/catch * Remove hardcoded hash tests show that solc 0.8.0 does the optimization as expected * Use try/catch to improve readability * ERC165Checker: Do not revert when returndata is empty + new test * Address PR comments * improve testing of ERC721Receiver errors * put back comment about invalid interface id * coverage does not support 0.8.1. Reverting back to 0.8.0 * bubble all data with length > 0 if onERC721Receive fails. * Fix test: revert without message trigger is bubble with the default message * using enum object to improve readability
16 lines
329 B
Solidity
16 lines
329 B
Solidity
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity ^0.8.0;
|
|
|
|
import "./IERC1155Receiver.sol";
|
|
import "../../introspection/ERC165.sol";
|
|
|
|
/**
|
|
* @dev _Available since v3.1._
|
|
*/
|
|
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
|
|
constructor() {
|
|
_registerInterface(type(IERC1155Receiver).interfaceId);
|
|
}
|
|
}
|