Skip to content

fix: use consistent rlp encoding for KeyAuthorization#207

Open
decofe wants to merge 2 commits intowevm:mainfrom
decofe:klkvr/fix-rlp-encoding
Open

fix: use consistent rlp encoding for KeyAuthorization#207
decofe wants to merge 2 commits intowevm:mainfrom
decofe:klkvr/fix-rlp-encoding

Conversation

@decofe
Copy link
Copy Markdown
Contributor

@decofe decofe commented Apr 2, 2026

Matches the encoding change in tempoxyz/tempo#3443. expiry: 0 is no longer encoded as 0x80 when trailing (no limits present). Treats expiry: 0 the same as undefined (never expires).

In toTuple, the condition now checks expiry !== 0 in addition to !== null and !== undefined, so a zero expiry doesn't emit a redundant RLP byte.

In fromTuple, decoded zero expiry is normalized to undefined via hexToNumber(expiry) || undefined.

Prompted by: klkvr

Co-authored-by: Arsenii Kulikov <62447812+klkvr@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d4f6f-abd8-73c6-8b2e-e785405a884a
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

@decofe is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 2, 2026

Open in StackBlitz

npm i https://pkg.pr.new/ox@207

commit: f798d4b

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