vyper icon indicating copy to clipboard operation
vyper copied to clipboard

Constants not fully supported in `.vyi` files

Open AlbertoCentonze opened this issue 7 months ago • 1 comments

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

AlbertoCentonze avatar Jul 15 '24 14:07 AlbertoCentonze