-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(world): add NatSpec to IERC165 (#1630)
Co-authored-by: alvarius <[email protected]>
- Loading branch information
Showing
1 changed file
with
17 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.8.21; | ||
|
||
/** | ||
* @dev Calculation for ERC-165 interface ID for the `supportsInterface` function. | ||
*/ | ||
bytes4 constant ERC165_INTERFACE_ID = IERC165.supportsInterface.selector; | ||
|
||
// See https://eips.ethereum.org/EIPS/eip-165 | ||
/** | ||
* @title IERC165 | ||
* @dev Interface for the ERC-165 standard as described in the EIP-165. | ||
* Allows for contracts to be checked for their support of an interface. | ||
* See: https://eips.ethereum.org/EIPS/eip-165 | ||
*/ | ||
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. | ||
/// @return `true` if the contract implements `interfaceID` and | ||
/// `interfaceID` is not 0xffffffff, `false` otherwise | ||
/** | ||
* @notice Query if a contract implements an interface. | ||
* @dev Interface identification is specified in ERC-165. | ||
* This function uses less than 30,000 gas. | ||
* @param interfaceID The interface identifier, as specified in ERC-165. | ||
* @return True if the contract implements `interfaceID` and | ||
* `interfaceID` is not 0xffffffff, false otherwise. | ||
*/ | ||
function supportsInterface(bytes4 interfaceID) external view returns (bool); | ||
} |