Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implements does not allow for imported interfaces #3766

Closed
pcaversaccio opened this issue Feb 9, 2024 · 0 comments · Fixed by #3729
Closed

implements does not allow for imported interfaces #3766

pcaversaccio opened this issue Feb 9, 2024 · 0 comments · Fixed by #3729

Comments

@pcaversaccio
Copy link
Collaborator

pcaversaccio commented Feb 9, 2024

Version Information

  • vyper Version (output of vyper --version): 0.3.11+commit.c6b29c7f
  • OS: linux
  • Python Version (output of python --version): 3.11.3

What's your issue about?

Related comment #3729 (review). Using the singleton modules with ownership hierarchy design for the PoC:

# mod3.vy

# Assume a folder `interfaces` at root directory with a file `IAccessControl.vy`
import interfaces.IAccessControl as IAccessControl

# mod2.vy

import mod3

# mod1.vy

import mod2 as acl

implements: acl.mod3.IAccessControl

@deploy
def __init__():
    pass

This will throw with:

vyper.exceptions.InvalidType: 'acl.mod3.IAccessControl' is not a type!

How can it be fixed?

Allow expressions of:

implements: lib.InterfaceDefinition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant