Skip to content

Additions to compiled_contracts table#41

Merged
manuelwedler merged 4 commits into
masterfrom
compiled_contracts-additions
Mar 3, 2026
Merged

Additions to compiled_contracts table#41
manuelwedler merged 4 commits into
masterfrom
compiled_contracts-additions

Conversation

@manuelwedler
Copy link
Copy Markdown
Member

@manuelwedler manuelwedler commented Feb 25, 2026

This tackles a few improvements to the compiled_contracts table:

@manuelwedler manuelwedler marked this pull request as ready for review February 25, 2026 09:22
@manuelwedler manuelwedler moved this to Sprint - Needs Review in Sourcify Public Feb 25, 2026
@kuzdogan kuzdogan self-assigned this Feb 26, 2026
@kuzdogan
Copy link
Copy Markdown
Member

kuzdogan commented Mar 3, 2026

@claude review

Copy link
Copy Markdown
Member

@kuzdogan kuzdogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}
        }
    }
}

Copy link
Copy Markdown
Member

@kuzdogan kuzdogan Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment from Claude.

I think we are missing one level of mapping?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}

Copy link
Copy Markdown
Member

@kuzdogan kuzdogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comment from Claude finding. Not important.

lgtm



class TestAdditionalInput:
def test_null_succeeds(self, connection, dummy_code, dummy_compiled_contract):
Copy link
Copy Markdown
Member

@kuzdogan kuzdogan Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment from Claude.

I think we are missing one level of mapping?

@manuelwedler manuelwedler merged commit 90325c3 into master Mar 3, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from Sprint - Needs Review to Sprint - Done in Sourcify Public Mar 3, 2026
@manuelwedler manuelwedler deleted the compiled_contracts-additions branch March 3, 2026 08:58
@kuzdogan kuzdogan moved this from Sprint - Done to COMPLETED in Sourcify Public Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants