fix: align frame rpc requests and results - #480
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de7fd28c89
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| flags: z.optional(z_Hex.Hex), | ||
| mode: z_Hex.Hex, |
There was a problem hiding this comment.
Validate mode and flags as RPC quantities
When a request contains a noncanonical quantity such as mode: '0x00' or flags: '0x01', these fields pass z_Hex.Hex and core_FrameRequest.fromRpc silently converts them to numbers, even though the adjacent gas/value fields correctly reject leading-zero RPC quantities. This makes the new public codec accept malformed wire requests that other quantity fields reject; use the quantity schema for mode and flags as well.
Useful? React with 👍 / 👎.
| raw: Hex.Hex | ||
| tx: Transaction.Rpc | ||
| raw?: Hex.Hex | undefined | ||
| tx: TxEnvelope.Rpc & { from: Address.Address } |
There was a problem hiding this comment.
Preserve custom transaction types in fill results
When eth_fillTransaction is used against a custom chain or a client supporting a newer transaction type, the result can carry an arbitrary hex type, but TxEnvelope.Rpc is a closed union of the six built-in envelope types. The request side still accepts arbitrary type strings, and the previous Transaction.Rpc return type included a BaseRpc fallback, so this change makes valid custom fill responses impossible to represent; use a lookup-metadata-free generic transaction shape that retains the unknown-type fallback.
Useful? React with 👍 / 👎.
Expose
FrameRequestand align request gas estimation, fill responses, simulation results, and signature signer types with ethereum/execution-apis#907. Preserve committed gas defaults when converting envelopes.