Skip to content

Commit

Permalink
docs(world): add NatSpec to IERC165 (#1630)
Browse files Browse the repository at this point in the history
Co-authored-by: alvarius <[email protected]>
  • Loading branch information
qbzzt and alvrs authored Sep 29, 2023
1 parent ae4e173 commit 759eca2
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions packages/world/src/IERC165.sol
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);
}

0 comments on commit 759eca2

Please sign in to comment.