Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Commit

Permalink
standardize ierc165 usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jgeary committed Oct 31, 2022
1 parent 2c426e7 commit 60da4f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions contracts/modules/Asks/Omnibus/AsksOmnibus.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pragma solidity 0.8.10;
import {ReentrancyGuard} from "@rari-capital/solmate/src/utils/ReentrancyGuard.sol";
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";

import {ERC721TransferHelper} from "../../../transferHelpers/ERC721TransferHelper.sol";
import {IncomingTransferSupportV1} from "../../../common/IncomingTransferSupport/V1/IncomingTransferSupportV1.sol";
Expand Down Expand Up @@ -66,11 +67,10 @@ contract AsksOmnibus is IAsksOmnibus, ReentrancyGuard, IncomingTransferSupportV1
}

/// @notice Implements EIP-165 for standard interface detection
/// @dev `0x01ffc9a7` is the IERC165 interface id
/// @param _interfaceId The identifier of a given interface
/// @return If the given interface is supported
function supportsInterface(bytes4 _interfaceId) external pure returns (bool) {
return _interfaceId == type(IAsksOmnibus).interfaceId || _interfaceId == 0x01ffc9a7;
return _interfaceId == type(IAsksOmnibus).interfaceId || _interfaceId == type(IERC165).interfaceId;
}

/// @notice Creates a simple ETH ask for a given NFT
Expand Down
1 change: 0 additions & 1 deletion contracts/modules/Offers/Omnibus/OffersOmnibus.sol
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ contract OffersOmnibus is IOffersOmnibus, ReentrancyGuard, IncomingTransferSuppo
}

/// @notice Implements EIP-165 for standard interface detection
/// @dev `0x01ffc9a7` is the IERC165 interface id
/// @param _interfaceId The identifier of a given interface
/// @return If the given interface is supported
function supportsInterface(bytes4 _interfaceId) external pure returns (bool) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pragma solidity 0.8.10;
import {ReentrancyGuard} from "@rari-capital/solmate/src/utils/ReentrancyGuard.sol";
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";

import {ERC721TransferHelper} from "../../../transferHelpers/ERC721TransferHelper.sol";
import {IncomingTransferSupportV1} from "../../../common/IncomingTransferSupport/V1/IncomingTransferSupportV1.sol";
Expand Down Expand Up @@ -88,11 +89,10 @@ contract ReserveAuctionOmnibus is
}

/// @notice Implements EIP-165 for standard interface detection
/// @dev `0x01ffc9a7` is the IERC165 interface id
/// @param _interfaceId The identifier of a given interface
/// @return If the given interface is supported
function supportsInterface(bytes4 _interfaceId) external pure returns (bool) {
return _interfaceId == type(IReserveAuctionOmnibus).interfaceId || _interfaceId == 0x01ffc9a7;
return _interfaceId == type(IReserveAuctionOmnibus).interfaceId || _interfaceId == type(IERC165).interfaceId;
}

/// @notice Creates a simple ETH auction for a given NFT
Expand Down

0 comments on commit 60da4f4

Please sign in to comment.