File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,35 @@ Otherwise, you can set the path to `vyper` in your `foundry.toml` by adding the
1212path = " /path/to/vyper"
1313```
1414
15+ #### Vyper libraries via ` forge install `
16+
17+ If you want an import like the following to work in your Vyper contract:
18+
19+ ``` vyper
20+ from snekmate.utils import eip712_domain_separator
21+ ```
22+
23+ You can install Vyper the desired library via ` forge install ` e.g. ` forge install pcaversaccio/snekmate ` .
24+
25+ You then need to adjust your ` foundry.toml ` as follows (replacing "snekmate" with the name of your
26+ desired package):
27+
28+ ``` toml
29+ skip = [" **/lib/snekmate/**" ]
30+ libs = [" lib" , " lib/snekmate/src" ]
31+ ```
32+
33+ #### Vyper libraries via ` pip `
34+
35+ Alternatively if you want to install the package via ` pip ` into your system's python configuration
36+ or a virtual environment you can point foundry to it by modifying your ` foundry.toml ` as follows:
37+
38+ ``` toml
39+ # Assuming you have a virtual environment in `.venv` and are using Python 3.12
40+ libs = [" lib" , " .venv/lib/python3.12/site-packages/" ]
41+ ```
42+
43+ Note that compatible alternative python package managers like ` uv ` will work too.
1544
1645### 2. Solidity tests
1746
You can’t perform that action at this time.
0 commit comments