Skip to content

Reconsider or clarify the "No Interfaces" directive to allow for compiler generated ERC165 interface IDs. #38

Description

@cyotee

ERC-2535 states Diamond's may expose ERC-165. Even stating how the IDiamondCut interface ID is calculated.

Solidity now computes ERC165 interface IDs for you with type(Interface).interfaceid.

How does the "No Interfaces" directive relate to this? May contributions include interfaces to use the computed interface ID? Does the directive only relate to inheriting interfaces into contracts? And, is there a reason for the limitation beyond just not being relevant to deployed code and conforming with the no inheritance directive?

Activity

  1. mudgen commented on Oct 20, 2025

    @mudgen
    Contributor

    Compose is going to needs to have interfaces for the reason you mention and to interoperate with ERC standards and other contracts.

    I am not sure yet if we should allow contracts to inherit interfaces, because so far the name of a contract and documentation about it should say what it implements, and inheriting interfaces adds a bit of complexity and I am trying remove every bit complexity we can. So for now we are not inheriting interfaces.

  2. cyotee commented on Oct 20, 2025

    @cyotee
    Author

    Not inheriting is fine. Inadvisable, because you have no assurance that a facet correctly implemented an interface. And it is possible to reduce complexity to a degree you cause problems.

    It's easy to mandate the devs can't use @inheritdoc as a contribution guideline while allow interface inheritance so we get compiler compliance checks. A custom linter rule could enforce that in the CI pipeline.

  3. mudgen commented on Oct 21, 2025

    @mudgen
    Contributor

    no assurance that a facet correctly implemented an interface. And it is possible to reduce complexity to a degree you cause problems.

    That is correct. No interface inheritance for now.

  4. maxnorm commented on Oct 21, 2025

    @maxnorm
    Collaborator

    Hi, @mudgen & @cyotee, i suggest opening a new github discussion thread instead of a issue for now.

    I will close the issue if it's ok with y'all

  5. mudgen commented on Oct 21, 2025

    @mudgen
    Contributor

    I am converting this to a discussion.

  6. locked and limited conversation to collaborators on Oct 21, 2025
  7. converted this issue into a discussion #76 on Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions