Skip to content

Commit

Permalink
fix: add bytecode metadata option to vyper-json (#3117)
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg authored Oct 9, 2022
1 parent 6020b8b commit f4deb13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
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

0 comments on commit f4deb13

Please sign in to comment.