Skip to content

Commit

Permalink
chore: add metadata to vyper-json (#3622)
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg authored Sep 27, 2023
1 parent 950a97e commit 2bdbd84
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions tests/cli/vyper_json/test_output_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,9 @@ def test_solc_style():
input_json = {"settings": {"outputSelection": {"foo.vy": {"": ["abi"], "foo.vy": ["ir"]}}}}
sources = {"foo.vy": ""}
assert get_input_dict_output_formats(input_json, sources) == {"foo.vy": ["abi", "ir_dict"]}


def test_metadata():
input_json = {"settings": {"outputSelection": {"*": ["metadata"]}}}
sources = {"foo.vy": ""}
assert get_input_dict_output_formats(input_json, sources) == {"foo.vy": ["metadata"]}
2 changes: 1 addition & 1 deletion vyper/cli/vyper_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"interface": "interface",
"ir": "ir_dict",
"ir_runtime": "ir_runtime_dict",
# "metadata": "metadata", # don't include in "*" output for now
"metadata": "metadata",
"layout": "layout",
"userdoc": "userdoc",
}
Expand Down
1 change: 0 additions & 1 deletion vyper/compiler/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def build_ir_runtime_dict_output(compiler_data: CompilerData) -> dict:


def build_metadata_output(compiler_data: CompilerData) -> dict:
warnings.warn("metadata output format is unstable!")
sigs = compiler_data.function_signatures

def _var_rec_dict(variable_record):
Expand Down

0 comments on commit 2bdbd84

Please sign in to comment.