Skip to content

Commit

Permalink
add json layout assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Dec 12, 2024
1 parent 5d3c946 commit 4183a23
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/unit/cli/vyper_compile/test_compile_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ def test_solc_json_output(input_files):
# the same as compiling directly
json_out = compile_json(json_input)["contracts"]["contract.vy"]
json_out_bytecode = json_out["contract"]["evm"]["bytecode"]["object"]
json_out_layout = json.loads(json_out["contract"]["layout"])["storage_layout"]

out2 = compile_files(
[contract_file],
Expand All @@ -436,6 +437,7 @@ def test_solc_json_output(input_files):
)

assert out2[contract_file]["bytecode"] == json_out_bytecode
assert out2[contract_file]["layout"]["storage_layout"] == json_out_layout

# tamper with the integrity sum
json_input["integrity"] = TAMPERED_INTEGRITY_SUM
Expand Down

0 comments on commit 4183a23

Please sign in to comment.