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

Can't have an interface as a constant #3407

Closed
fubuloubu opened this issue May 13, 2023 · 0 comments · Fixed by #3718
Closed

Can't have an interface as a constant #3407

fubuloubu opened this issue May 13, 2023 · 0 comments · Fixed by #3718
Milestone

Comments

@fubuloubu
Copy link
Member

Version Information

  • vyper Version (output of vyper --version): 0.3.7
  • OS: linux
  • Python Version (output of python --version): n/a

What's your issue about?

If you try to define an interface constant, it doesn't see it as a literal value

interface Bar:
    def bar(): nonpayable


BAR: constant(Bar) = Bar(0x0000000000000000000000000000000000000000)
  File "~/.pyenv/versions/3.9.13/envs/academy/lib/python3.9/site-packages/ape_vyper/compiler.py", line 236, in compile
    result = vvm.compile_standard(
  File "~/.pyenv/versions/3.9.13/envs/academy/lib/python3.9/site-packages/vvm/main.py", line 188, in compile_standard
    raise VyperError(
vvm.exceptions.VyperError: Value must be a literal
  contract "Foo.vy:5", line 5:21 
       4
  ---> 5 BAR: constant(Bar) = Bar(0x0000000000000000000000000000000000000000)
  ----------------------------^
       6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants