Repository navigation
fix: port recent viem fixes to AbiParameters, Block, Bytes, Fee, Hex and PersonalMessage - #729
Merged
Merged
Conversation
…e`, `Hex` and `PersonalMessage` - Kept a leading U+FEFF when decoding UTF-8 strings (wevm/viem#5590). - Rejected a missing static head after a dynamic parameter in AbiParameters.decode (wevm/viem#5572). - Rejected odd-length hex in PersonalMessage.encode (wevm/viem#5631). - Added blockAccessListHash and slotNumber to Block (wevm/viem#5674). - Added baseFeePerBlobGas and blobGasUsedRatio to Fee.FeeHistory (wevm/viem#5635). Amp-Thread-ID: https://ampcode.com/threads/T-01a21f59-905f-745c-8634-6581aa9f965e Co-authored-by: jxom <7336481+jxom@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
|
Published pnpm add ox@pr-729
pnpm add ox@0.0.0-pr-729-f54cacf |
jxom
added a commit
that referenced
this pull request
Nov 28, 2026
…e`, `Hex` and `PersonalMessage` (#730) - Kept a leading U+FEFF when decoding UTF-8 strings (wevm/viem#5590). - Rejected a missing static head after a dynamic parameter in AbiParameters.decode (wevm/viem#5572). - Rejected odd-length hex in PersonalMessage.encode (wevm/viem#5631). - Added blockAccessListHash and slotNumber to Block (wevm/viem#5674). - Added baseFeePerBlobGas and blobGasUsedRatio to Fee.FeeHistory (wevm/viem#5635). Backport of #729. Amp-Thread-ID: https://ampcode.com/threads/T-01a21f59-905f-745c-8634-6581aa9f965e Co-authored-by: Amp <amp@ampcode.com>
Merged
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the viem fixes and features from the last two weeks that apply to ox primitives.
Hex.toString,Bytes.toStringandAbiParameters.decodelost it. The decoder now setsignoreBOM: true.AbiParameters.decodeskipped restoring the head position when the cursor reached the end, so a missinguint256head after astring/bytesparameter re-read an earlier word. It now throwsAbiParameters.DataSizeTooSmallError.PersonalMessage.encode(fix: left-pad odd-length raw hex in toPrefixedMessage viem#5631): returned misaligned hex. viem left-pads, but ox'sBytes.fromHexrejects odd-length hex, so this throwsHex.InvalidLengthErrorinstead.blockAccessListHashandslotNumberonBlock(feat: addblockAccessListHashandslotNumbertoBlocktype viem#5674): type,fromRpc/toRpc, and the zod schema.baseFeePerBlobGasandblobGasUsedRatioonFee.FeeHistory(feat: return blob gas fields from getFeeHistory viem#5635): type,fromHistoryRpc/toHistoryRpc, and the zod schema.The
Bytes.toStringparity test and the Bytes/Base64 fuzz references now compare againstTextDecoderwithignoreBOM: true, so they still check the fast path.Other viem changes in the window were already in ox (SIWE, RLP canonical, compressed public keys, EIP-712 domain,
requestsHash, typed data arrays) or have no ox counterpart (ERC ABI constants, Tempo actions/ABIs, OP Stack, ERC-7739, transports).Verified with
pnpm test --project core(offline, without Anvil): the same 33 Anvil-dependent tests fail as on unmodifiedmain, and every new test passes. The ABI head test fails without the fix.pnpm check:typesandvp checkpass.