-
Notifications
You must be signed in to change notification settings - Fork 9
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
chore: re-export fastnum
and update crate version
#102
Conversation
`fastnum` is now included to support the `BigInt` type via `fastnum::I512`. Updated the version in `Cargo.toml` from `4.0.0-rc` to `4.0.0-rc1` to reflect the changes.
WalkthroughThe pull request introduces updates to the Uniswap SDK Core library, focusing on version increment and numerical type modifications. The package version is bumped from Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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
CodeRabbit Configuration File (
|
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: 0
🧹 Nitpick comments (1)
src/lib.rs (1)
52-52
: Consider being more selective with fastnum re-exports.Instead of re-exporting the entire
fastnum
crate, consider explicitly re-exporting only the types and functions that are needed by the SDK users. This would provide better control over the public API and prevent potential naming conflicts.-pub use fastnum; +pub use fastnum::{I512, U512, D512, decimal::RoundingMode};
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
Cargo.toml
(1 hunks)src/lib.rs
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- Cargo.toml
🔇 Additional comments (1)
src/lib.rs (1)
Line range hint
54-57
: Type alias changes look good but require ecosystem verification.The type aliases are well-structured and consistently use 512-bit types from fastnum, which is appropriate for DeFi calculations. However, since this changes core type definitions, we should verify compatibility.
Let's verify the impact on the ecosystem:
✅ Verification successful
Type alias changes are verified and safe to use
The migration from bnum to fastnum types is consistent throughout the codebase. All mathematical operations, currency calculations, and price computations maintain their precision and correctness with the new 512-bit types.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for potential compatibility issues with the type changes # Look for direct usage of the old types echo "Checking for direct type usage patterns..." rg -A 2 "(?:BigInt|BigUint|BigDecimal|RoundingMode)::?" --type rust # Look for potential trait implementations or where clauses echo "Checking for trait implementations and where clauses..." ast-grep --pattern 'impl$$$for$$$where$$$' # Look for type conversions that might be affected echo "Checking for type conversions..." rg -A 2 "(?:as|into|from|try_into|try_from)" --type rustLength of output: 81744
fastnum
is now included to support theBigInt
type viafastnum::I512
. Updated the version inCargo.toml
from4.0.0-rc
to4.0.0-rc1
to reflect the changes.Summary by CodeRabbit
New Features
fastnum
library for enhanced numerical handlingChores
4.0.0-rc
to4.0.0-rc1