ape-vyper icon indicating copy to clipboard operation
ape-vyper copied to clipboard

How to tell which version of vyper to use?

Open PatrickAlphaC opened this issue 2 years ago • 3 comments

Environment information

  • ape and plugin versions: vyper 0.2.0 ape 0.2.7 vyper 0.3.3+commit.48e326f

  • Python Version: 3.9.5

  • OS: osx

What went wrong?

Please include information like:

I have a contract that looks like this:

a: uint80

When I run ape compile I get:

INFO: Compiling 'MyContract.vy'.
ERROR: (VyperCompileError) vyper.exceptions.UnknownType: No builtin or user-defined type named 'uint80'
  contract "/DIR/vyper-wcbpnrwq.vy", line 26:3 
       25 #     return price
  ---> 26 a: uint80
  -----------^
       27

[19956] Failed to execute script vyper_compile

How can I tell it to use 0.3.3 of vyper?

PatrickAlphaC avatar Jun 07 '22 15:06 PatrickAlphaC

Running vyper and the contract name compiles fine

PatrickAlphaC avatar Jun 07 '22 19:06 PatrickAlphaC

Got it. Went through the code and found it grabs it from the comments:

# @version ^0.3.3

It looks like we should create docs for each plugin

PatrickAlphaC avatar Jun 07 '22 19:06 PatrickAlphaC

We should also support config driven versioning

antazoey avatar Aug 19 '22 22:08 antazoey