bump: v2.0.0 - #39
bump: v2.0.0#39
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
Pull request overview
This PR syncs the Rust SDK to the upstream source and bumps the crate/API surface to v2.0.0, aligning with breaking indexer/engine API changes (leaderboard/points removals, portfolio history rework) and adding new endpoints/helpers.
Changes:
- Adds math/constants helpers and replaces some
/ 1e18hot-path operations with optimized constant-division + improvedi128 → f64conversion, with new randomized tests. - Updates indexer queries/types: removes leaderboard/points-related queries, adds portfolio + portfolio history queries, adds ADL light query, and extends event fields.
- Adds OTC match-orders execute response type, updates deployment configs, and introduces a fast-withdrawal end-to-end example.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/nado_utils/math.rs | Adds new constants + optimized fixed-point math helpers and extensive randomized tests. |
| src/nado_utils/indexer.rs | Updates indexer query/response surface: removes leaderboard/points, adds portfolio + ADL light, extends event schema. |
| src/nado_utils/engine.rs | Adds MatchOrdersOtcResponse and execute response enum variant. |
| src/nado_utils/eip712_alloy.rs | Adds EIP-712 alloy sol types and signing-hash helpers for new transaction structs. |
| src/nado_utils/configs/test/deployment.json | Updates foundationRewardsAirdrop address for test deployments. |
| src/nado_utils/configs/prod/deployment.json | Updates foundationRewardsAirdrop address for prod deployments. |
| src/nado_utils/bindings/perp_engine.rs | Removes updateRisk from perp engine ABI bindings. |
| src/core/indexer.rs | Adds trait methods for portfolio(+history) and ADL light; removes leaderboard accessor. |
| src/core/builder.rs | Wires new portfolio builders; removes leaderboard builder. |
| src/builders/indexer/portfolio.rs | New builder for the portfolio query. |
| src/builders/indexer/portfolio_history.rs | New builder for the portfolio history query. |
| src/builders/indexer/mod.rs | Exposes new portfolio modules; removes leaderboard module. |
| src/builders/indexer/leaderboard.rs | Removes the leaderboard builder implementation. |
| README.md | Updates dependency snippet to nado_sdk = "2.0.0". |
| examples/fast_withdrawal_e2e.rs | Adds an end-to-end fast withdrawal example (polls events and fetches signatures). |
| Cargo.toml | Bumps package version to 2.0.0 and registers the new example. |
Suppressed comments (3)
src/nado_utils/math.rs:461
- This test performs 2M randomized cases (and each case checks both
xand-x), which is likely to be too slow for regular CI runs. Reducing the iteration count (or moving the long sweep behind#[ignore]/a feature flag) would keep the test suite fast while still providing good coverage.
for _ in 0..2_000_000 {
src/nado_utils/math.rs:472
- This randomized equivalence test runs 2M iterations; combined with other multi-million-iteration tests in this module, it can significantly slow down
cargo test. Consider reducing the iteration count for default test runs.
for _ in 0..2_000_000 {
src/nado_utils/math.rs:535
- This test runs another 2M randomized cases. With multiple multi-million sweeps in this module, overall test runtime may become prohibitively long in CI. Consider lowering the default iteration count.
for _ in 0..2_000_000 {
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Syncs the SDK from source and bumps the version to 2.0.0.
Major bump — this release includes breaking API changes:
vlm→volume, newtradeSize/marketCountseries, additivecumulative_trade_count)Also included:
MatchOrdersOtcResponsefoundationRewardsAirdropaddresses🤖 Generated with Claude Code