Error: Source "project:/src/contracts/Interfaces/Libraries/IERC165.sol" not found

Viewed 15

i have an error about how the 'ierc165' is not found when i'm importing it to the 'erc165'. And I checked for any typos because i've gotten this error before, but there was nothing.

here's the code for my erc165

// SPDX-License-Identifier: MIT
  pragma solidity ^0.8.0;

  import './IERC165.sol';

  contract ERC165 is IERC165 {

    mapping (bytes4 => bool) private _supportedInterfaces;

    constructor() {
      _registerInterface(bytes4(keccak256('supportsInterface(bytes4)'))); 
    }

    function supportsInterface(bytes4 interfaceID) external view returns (bool) {
      return _supportedInterfaces[interfaceID];
    }

    function _registerInterface(bytes4 interfaceId) internal{
      require(interfaceId != 0xfffffff, 'Invalid interface request');
      _supportedInterfaces[interfaceId] = true;
    }
  }

this is the code for my ierc165

// SPDX-License-Identifier: MIT
  pragma solidity ^0.8.0;

interface IERC165 {
    // @notice Query if a contract implements an interface
    // @param interfaceID The interface identifier, as specified in ERC-165
    // @dev Interface identification is specified in ERC-165. This function
    // uses less than 30,000 gas.
    // @retrun 'true' if the contract implements 'interfaceID' and
    // 'interfaceId' is not 0xffffffff, 'false' otherwise
    function supportsInterface(bytes4 interfaceID) external view returns (bool);
}
0 Answers
Related