Repository navigation
fix: port recent viem fixes to AbiParameters, Block, Bytes, Fee, Hex and PersonalMessage (0.x) - #730
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). Backport of #729. 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. |
Merged
This branch was successfully 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.
Backport of #729 to
0.x: ports the viem fixes and features from the last two weeks that apply to ox primitives.internal/bytesdropped a leading U+FEFF as a byte order mark, soHex.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 and returned it. It now throws (Cursor.PositionOutOfBoundsErroron this branch).PersonalMessage.encode(fix: left-pad odd-length raw hex in toPrefixedMessage viem#5631): returned misaligned hex. It now throwsHex.InvalidLengthError, matchingBytes.fromHex.blockAccessListHashandslotNumberonBlock(feat: addblockAccessListHashandslotNumbertoBlocktype viem#5674): type,fromRpcandtoRpc.baseFeePerBlobGasandblobGasUsedRatioonFee.FeeHistory(feat: return blob gas fields from getFeeHistory viem#5635): type only, since0.xhas no fee history converters.Differences from #729: no zod schemas on
0.x, and the decoder lives ininternal/bytes.ts. TheBytes.toStringparity test and Bytes fuzz references now compare againstTextDecoderwithignoreBOM: true.Verified on this branch:
pnpm check:typesandbiome checkpass. The ABI head test fails without the fix (decoding succeeds). Offlinepnpm test --project core(without Anvil): 2664 passed; the 34 failures are all network/RPC tests that time out without Anvil.