You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the Vyper CLI, the search path defaults to the current working directory and the Python sys.path since the 0.4.0 release.
How does this look like in practice: Let's do a typical workflow using 馃悕 snekmate contracts:
~$ mkdir test && cd test~$ python -m venv && source venv/bin/activate~$ pip install vyper snekmate~$ mkdir src && cd src && vi token.vy # here you put the example I paste below~$ cd .. && vyper src/token.vy
As a result, all imported 馃悕 snekmate contracts (e.g. from snekmate.tokens import erc20) are seamlessly located during compilation.
I have tested this workflow with the latest hardhat-vyper version and unfortunately it fails:
Error: Command failed: <path-to-compiler> --evm-version paris --optimize gas -f combined_json <some-path>/vyper-sandbox/contracts/vyper/Foo.vyvyper.exceptions.ModuleNotFound: snekmate.auth.ownable contract "<some-path>/vyper-sandbox/contracts/vyper/Foo.vy:4", line 4:0 3 from ethereum.ercs import IERC20Detailed ---> 4 from snekmate.auth import ownable -------^ 5 from snekmate.tokens import erc20[32916] Failed to execute script 'vyper_compile' due to unhandled exception!
Can you guys consider adding this in the near future since it will boost Vyper devex a lot IMHO.
Search terms
vyper, syspath, modules
The text was updated successfully, but these errors were encountered:
Describe the feature
When using the Vyper CLI, the search path defaults to the current working directory and the Python
sys.path
since the0.4.0
release.How does this look like in practice: Let's do a typical workflow using
馃悕 snekmate
contracts:As a result, all imported 馃悕 snekmate contracts (e.g.
from snekmate.tokens import erc20
) are seamlessly located during compilation.I have tested this workflow with the latest
hardhat-vyper
version and unfortunately it fails:Can you guys consider adding this in the near future since it will boost Vyper devex a lot IMHO.
Search terms
vyper, syspath, modules
The text was updated successfully, but these errors were encountered: