ERC-5269: EIP/ERC Detection and Discovery

A valuable feedback from @Vectorized

  • ERC-165 is hard to work with when in diamond inheritance
  • ERC-165 can’t represent any ERC without a method

@Vectorized also asked what if Solady supports one version and one month later an ERC draft is updated and the old smart contract is no longer considered compliant

Assuming ERC9999 is your new propal
it will does the following

  function supportEIP(
    address caller,
    uint256 majorEIPIdentifier,
    bytes32 minorEIPIdentifier,
    bytes calldata extraData)
  external view returns (bytes32 eipStatus) {
  if (majorEIPIdentifier == 721) return keccak256("Final"); 
  else if (majorEIPIdentifier == 1271) return keccak256("Final"); 
  else if (majorEIPIdentifier == 9999) return keccak256("Draft-v1");
}