Skip to content

Meta-programming interface - ERC165 support #1447

@axic

Description

@axic

While this topic can be fairly big and we have a couple of issues open already here I only suggest a fairly small, non-intrusive addition:

meta(<contract name>)

to return a meta object (similar to block, etc.). This would have the following defined currently:

  • .signatures returns bytes4[] corresponding to the method signatures of the contract
  • .name returns string as the name of the contract

The signatures could be utilised by proxy / filter contracts and for a way to implement interface checking between contracts (along the lines of ethereum/EIPs#165).

Two other possible methods:

  • .pragma(<key>) returns string of the actual pragma value or empty string if not set (or should the return type depend on the pragma type?)
  • .super returns meta[] corresponding to all the direct superclasses

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed due inactivityThe issue/PR was automatically closed due to inactivity.language design :rage4:Any changes to the language, e.g. new featuresstaleThe issue/PR was marked as stale because it has been open for too long.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions