Additions to compiled_contracts table#41
Conversation
|
@claude review |
kuzdogan
left a comment
There was a problem hiding this comment.
The test data here does not accurately reflect the actual Vyper storage_layout_overrides structure. Per vyper/pull/4370, the format maps file path → variable name → {slot, type, n_slots} (two nesting levels), but the test collapses this to one level (treating "x" as a file path with a direct {slot, type, n_slots} value instead of a variable name map).
Since validate_additional_input intentionally does not validate the inner structure of storage_layout_overrides, the constraint test itself is still correct — but the test data is misleading. Suggest updating to:
dummy_compiled_contract.additional_input = {
"storage_layout_overrides": {
"contracts/foo.vy": {
"x": {"slot": "0x0", "type": "uint256", "n_slots": 1}
}
}
}|
|
||
|
|
||
| class TestAdditionalInput: | ||
| def test_null_succeeds(self, connection, dummy_code, dummy_compiled_contract): |
There was a problem hiding this comment.
The test data here does not accurately reflect the actual Vyper storage_layout_overrides structure. Per vyper/pull/4370, the format maps file path → variable name → {slot, type, n_slots} (two nesting levels), but the test collapses this to one level (treating "x" as a file path with a direct {slot, type, n_slots} value instead of a variable name map).
Since validate_additional_input intentionally does not validate the inner structure of storage_layout_overrides, the constraint test itself is still correct — but the test data is misleading. Suggest updating to:
dummy_compiled_contract.additional_input = {
"storage_layout_overrides": {
"contracts/foo.vy": {
"x": {"slot": "0x0", "type": "uint256", "n_slots": 1}
}
}
}There was a problem hiding this comment.
Comment from Claude.
I think we are missing one level of mapping?
There was a problem hiding this comment.
I don't think so. Claude is just being stupid here.
We have "contracts/foo.vy" -> "x" -> {"slot": "0x0", "type": "uint256", "n_slots": 1}
what matches Claude's suggested type file path → variable name → {slot, type, n_slots}
kuzdogan
left a comment
There was a problem hiding this comment.
Small comment from Claude finding. Not important.
lgtm
|
|
||
|
|
||
| class TestAdditionalInput: | ||
| def test_null_succeeds(self, connection, dummy_code, dummy_compiled_contract): |
There was a problem hiding this comment.
Comment from Claude.
I think we are missing one level of mapping?
This tackles a few improvements to the
compiled_contractstable:transientStorageLayoutunder thecompilation_artifactscolumn (see AddingtransientStorageLayoutto outputs argotorg/sourcify#1654)userdoc,devdocandstorageLayoutoptional instead of mandatory keys undercompilation_artifactsfor consistency (see older Solidity versions issue: Verification of pre 0.4.11 contracts argotorg/sourcify#2296)additional_inputcolumn tocompiled_contracts(see Add newadditional_inputfield in VerA argotorg/sourcify#2001)