Skip to content

fix[lang]: preserve ABI metadata in array types - #5264

Open
DicksonWu654 wants to merge 1 commit into
vyperlang:masterfrom
DicksonWu654:fix/json-abi-decimal-arrays
Open

DicksonWu654 wants to merge 1 commit into
vyperlang:masterfrom
DicksonWu654:fix/json-abi-decimal-arrays

Conversation

@DicksonWu654

@DicksonWu654 DicksonWu654 commented Sep 12, 2026

Copy link
Copy Markdown

What I did

Preserve ABI metadata while recursively decoding fixed-size array types. This
prevents ABI entries for decimal arrays from being reconstructed as int168
arrays.

How I did it

Array decoding now carries the original ABI dictionary into the recursive
base-type call while replacing only the type field. This retains
internalType: decimal through every array dimension. Unit tests cover
one- and two-dimensional decoding, the int168 fallback, and a complete
compile/ABI/reconstruction round trip.

How to verify it

$ uv run pytest -q tests/unit/semantics/types
1435 passed, 2 warnings

$ uv run make lint
Success: no issues found in 206 source files
All done! ✨ 🍰 ✨
637 files left unchanged.
Skipped 2 files

Commit message

Array type parsing rebuilt the ABI description using only its type string.
This discarded internalType before parsing the base type, so decimal arrays
were reconstructed as int168 arrays even though scalar decimals were handled
correctly.

Carry the original ABI metadata through recursive array parsing. This
preserves the decimal distinction at every array depth while retaining the
existing int168 fallback when internalType is absent.

Description for the changelog

Fix ABI round trips incorrectly reconstructing decimal array elements as
int168.

Cute Animal Picture

Red panda

Array type parsing rebuilt the ABI description using only its type string. This discarded internalType before parsing the base type, so decimal arrays were reconstructed as int168 arrays even though scalar decimals were handled correctly.

Carry the original ABI metadata through recursive array parsing. This preserves the decimal distinction at every array depth while retaining the existing int168 fallback when internalType is absent.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-12T02:08:34.502559Z 2a8fceb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

1 participant