-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(torii): u256 json serialization as string #3042
Conversation
WalkthroughOhayo, sensei! This update refines the handling of the Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client
participant Serializer as U256 Serializer
Client->>Serializer: Request Serialization (U256 value)
Serializer->>Serializer: Format value to hex string ("0x...")
Serializer-->>Client: Return JSON hex string
sequenceDiagram
participant Client as Client
participant Deserializer as U256 Deserializer
Client->>Deserializer: Provide JSON hex string ("0x...")
Deserializer->>Deserializer: Trim "0x" and parse hex string
Deserializer-->>Client: Return U256 value
Possibly related PRs
Suggested reviewers
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
crates/dojo/types/src/schema.rs
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: docs
- GitHub Check: clippy
- GitHub Check: build
🔇 Additional comments (1)
crates/dojo/types/src/schema.rs (1)
352-352
: LGTM! Simplified U256 serialization.The change to serialize U256 as a hex string with "0x" prefix aligns with common JSON serialization patterns for large numbers.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3042 +/- ##
==========================================
+ Coverage 56.19% 56.20% +0.01%
==========================================
Files 437 437
Lines 58821 58805 -16
==========================================
- Hits 33057 33054 -3
+ Misses 25764 25751 -13 ☔ View full report in Codecov by Sentry. |
fixes #3040 |
Summary by CodeRabbit