Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add bytecode metadata option to vyper-json #3117

Merged
merged 6 commits into from
Oct 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/compiling-a-contract.rst
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ The following example describes the expected input format of ``vyper-json``. Com
// optional, whether or not optimizations are turned on
// defaults to true
"optimize": true,
// optional, whether or not the bytecode should include Vyper's signature
// defaults to true
"bytecodeMetadata": true,
// The following is used to select desired outputs based on file names.
// File names are given as keys, a star as a file name matches all files.
// Outputs can also follow the Solidity format where second level keys
Expand Down
2 changes: 2 additions & 0 deletions vyper/cli/vyper_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ def compile_from_input_dict(

evm_version = get_evm_version(input_dict)
no_optimize = not input_dict["settings"].get("optimize", True)
no_bytecode_metadata = not input_dict["settings"].get("bytecodeMetadata", True)

contract_sources: ContractCodes = get_input_dict_contracts(input_dict)
interface_sources = get_input_dict_interfaces(input_dict)
Expand All @@ -377,6 +378,7 @@ def compile_from_input_dict(
initial_id=id_,
no_optimize=no_optimize,
evm_version=evm_version,
no_bytecode_metadata=no_bytecode_metadata,
)
except Exception as exc:
return exc_handler(contract_path, exc, "compiler"), {}
Expand Down