Repository navigation
fix: trim whole zero bytes from the right - #5571
Conversation
|
@yinbowen-dc is attempting to deploy a commit to the Wevm Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 7003a4e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Checked this against the bytes path and ox. On viem 2.58.0, the hex branch of
I also ran the new right-trim loop against |
Fixes #5567.
Right trimming now removes complete 00 bytes, preserving nonzero bytes ending in a zero nibble. For example, 0x10200000 now produces 0x1020 instead of 0x0102. Includes hex/byte parity regressions and a patch changeset.
The existing long right-trim vector also lost a nonzero nibble; its expected result is corrected from 0x01a4e12a45 to 0x1a4e12a450.
Validation: the regression fails on main; all 7 trim tests pass. Biome and production TypeScript check pass. Full pnpm check:types was attempted and is blocked by missing generated test-contract artifacts. No public type signatures changed.
AI assistance: this fix and its tests were prepared with Codex at the account owner's request.