Skip to content

Commit

Permalink
fix: allows vyper 4 to work
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Apr 11, 2024
1 parent 06325c7 commit b8b420c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions ape_vyper/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,13 +412,12 @@ def compile(

for vyper_version, version_settings in all_settings.items():
for settings_key, settings in version_settings.items():
source_ids = settings["outputSelection"]
optimization_paths = {p: base_path / p for p in source_ids}
source_paths = settings["outputSelection"]
input_json = {
"language": "Vyper",
"settings": settings,
"sources": {
s: {"content": p.read_text()} for s, p in optimization_paths.items()
p: {"content": Path(p).read_text()} for p in source_paths
},
}

Expand Down Expand Up @@ -769,7 +768,7 @@ def get_compiler_settings(

version_settings[settings_key] = {
"optimize": optimization,
"outputSelection": {s: ["*"] for s in selection},
"outputSelection": {(base_path / s).as_posix(): ["*"] for s in selection},
}
if evm_version and evm_version not in ("none", "null"):
version_settings[settings_key]["evmVersion"] = f"{evm_version}"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"ethpm-types", # Use same version as eth-ape
"tqdm", # Use same version as eth-ape
"vvm>=0.2.0,<0.3",
"vyper~=0.3.7",
"vyper>=0.3.7,<0.5"
],
python_requires=">=3.8,<4",
extras_require=extras_require,
Expand Down

0 comments on commit b8b420c

Please sign in to comment.