Skip to content

Conversation

ceyonur
Copy link

@ceyonur ceyonur commented Oct 1, 2025

Why this should be merged

The current rlpgen partially supports named types with basic underlying, and it generates the rlp without correct conversion i.e:
w.WriteUint64(obj.Uint64NewT)

This PR adds the full support it

How this works

Adds check for isNamedWithBasicUnderlying and then returns a op with makeNamedBasicOp which is basically a basicOp but with the typ refers to the named type so that it can correctly encode decode with the named type.

How this was tested

Added UT tests

@ceyonur ceyonur changed the base branch from master to main October 1, 2025 19:23
Copy link
Collaborator

@ARR4N ARR4N left a comment

Choose a reason for hiding this comment

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

We should probably send a PR upstream too once we've merged this.

@ceyonur ceyonur enabled auto-merge (squash) October 7, 2025 18:56
@ceyonur ceyonur merged commit 9ed36b6 into main Oct 8, 2025
12 checks passed
@ceyonur ceyonur deleted the ceyonur/check-underlying-basic-type branch October 8, 2025 07:07
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