// SPDX-License-Identifier: MIT // solhint-disable private-vars-leading-underscore pragma solidity ^0.8.13; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "./IListingConfigurator.sol"; abstract contract AbstractListingConfigurator is IListingConfigurator, ERC165 { using ERC165Checker for address; using Assets for Assets.AssetId[]; modifier whenSorted(Assets.AssetId[] calldata assetIds) { IAssetController(_metahub().assetClassController(assetIds[0].class)).ensureSorted(assetIds); _; } /** * @dev inheritdoc IListingConfigurator */ function __supportedInterfaces(bytes4[] memory interfaceIds) external view returns (bool[] memory) { return address(this).getSupportedInterfaces(interfaceIds); } function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IListingConfigurator).interfaceId || interfaceId == type(IListingTermsAware).interfaceId || super.supportsInterface(interfaceId); } function _metahub() internal view virtual returns (IMetahub); }