Fix TransactionSelection.kind to accept tx-type integers#60
Conversation
The server schema for transactions[].type is Vec<u8> (EIP-2718 tx-type
bytes), as confirmed by the Node client (Array<number>) and by direct
HTTP probes. The Python wrapper had it as Vec<String> on the Rust side
and list[str] in the dataclass, which made server-side filtering by
transaction type unreachable: string values were rejected at the
wrapper's internal try_convert validation, and integer values were
rejected by pyo3's FromPyObject.
Change the field type to Vec<u8> / list[int] to match the Node client
and the actual server schema. The serde rename to "type" stays.
TraceSelection.kind is intentionally left as Vec<String>: trace types
are string enums ("call", "create", "suicide", "reward").
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR updates the ChangesTransaction Type Representation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The server schema for transactions[].type is Vec (EIP-2718 tx-type bytes), as confirmed by the Node client (Array) and by direct HTTP probes. The Python wrapper had it as Vec on the Rust side and list[str] in the dataclass, which made server-side filtering by transaction type unreachable: string values were rejected at the wrapper's internal try_convert validation, and integer values were rejected by pyo3's FromPyObject.
Change the field type to Vec / list[int] to match the Node client and the actual server schema. The serde rename to "type" stays.
TraceSelection.kind is intentionally left as Vec: trace types are string enums ("call", "create", "suicide", "reward").
Summary by CodeRabbit