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

Constants not fully supported in .vyi files #4176

Open
AlbertoCentonze opened this issue Jul 15, 2024 · 1 comment
Open

Constants not fully supported in .vyi files #4176

AlbertoCentonze opened this issue Jul 15, 2024 · 1 comment
Milestone

Comments

@AlbertoCentonze
Copy link
Contributor

What's your issue about?

Given the interface below foo.vyi it is currently possible to declare constants:

bar: constant(uint256)

However, compilation fails when importing the interface in a contract file and trying to use the constant above.

import foo

@external
def some_function() -> uint256:
    return foo.bar

How can it be fixed?

Either allow constants to be imported successfully from interfaces (I would prefer this option) or remove the possibility to declare constants in vyi files

@trocher
Copy link
Contributor

trocher commented Jul 15, 2024

linking #3991 as they are dup

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

3 participants