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

Vyper interface files (.vyi) do not appear as interfaces in project #134

Open
fubuloubu opened this issue Sep 28, 2024 · 6 comments
Open

Comments

@fubuloubu
Copy link
Member

Overview

The vyper plugin does not currently generate Vyper ABI artifacts for .vyi interface files:

contracts/
  StreamFactory.vy
  StreamManager.vy
  Validator.vyi
$ ape console
In [1]: print(project.Validator.contract_type)
ERROR: (ApeAttributeError) 'LocalProject' object has no attribute 'Validator'. Also checked extra(s) 'contracts'.

Specification

The plugin should be able to do this natively. For now, the workaround is that you can place a <Interface>.json in your contracts folder (with hopefully the same ABI) and the pm "compiler" will grab it. Obviously a potentially source for human error, but it works

Dependencies

n/a

Copy link

linear bot commented Sep 28, 2024

@antazoey
Copy link
Member

antazoey commented Oct 2, 2024

I get error in vyper when I try to compile interfaces, like:

ERROR: (VyperCompileError) contracts/interfaces/IFaceZeroFour.vyi
StructureException:`...` is not allowed in `.vy` files! Did you mean to import me as a `.vyi` file?

^ very odd error, may be a bug in vyper even

Maybe they need special output selection.

@antazoey
Copy link
Member

antazoey commented Oct 2, 2024

I get this same error when running vyper directly:

vyper contracts/interfaces/IFaceZeroFour.vyi

@fubuloubu
Copy link
Member Author

I get error in vyper when I try to compile interfaces, like:

ERROR: (VyperCompileError) contracts/interfaces/IFaceZeroFour.vyi
StructureException:`...` is not allowed in `.vy` files! Did you mean to import me as a `.vyi` file?

^ very odd error, may be a bug in vyper even

Maybe they need special output selection.

you can't actually "compile" them, but I think -f abi should work

@antazoey
Copy link
Member

antazoey commented Oct 2, 2024

@antazoey
Copy link
Member

antazoey commented Oct 2, 2024

you can't actually "compile" them, but I think -f abi should work

I tried this but got the same error.

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

No branches or pull requests

2 participants