Skip to content

Conversation

@zavelevsky
Copy link
Contributor

@zavelevsky zavelevsky commented Nov 21, 2025

Note

Migrate SDK to ethers v6 with BigInt-based numerics, refactor APIs and matchers, simplify ChainCache schema, and update demos/tests and build tooling accordingly.

  • Core Types & Numerics:
    • Replace BigNumber with native bigint across SDK (common/types, utils/numerics, utils/serializers, utils/encoders).
    • Adjust encoders/match utilities to BigInt math and return types.
  • Contracts API (ethers v6):
    • Switch to ethers v6 (Provider, Interface, TransactionRequest) and event APIs (getEvent, bigint args).
    • Update Reader multicall targets (contract.target), fee getters return number.
    • Update Composer populate calls and overrides to use bigint.
  • Trade Matcher & Strategy Management:
    • Refactor match/trade logic to bigint; update Toolkit helpers and fee math.
  • Chain Cache:
    • Bump scheme to 7; simplify serialized dump (remove trades/blocks metadata), convert to RetypeBigIntToString.
    • Add cache-miss handler flow; fix strategy updates/deletes using bigint IDs; change pair key separator to _.
  • Adapters (Uni v3):
    • Use bigint for addresses/fields; liquidity/tick calculations unchanged in behavior.
  • Demo:
    • Update provider init to new ethers.JsonRpcProvider and event filter usage.
  • Build & Deps:
    • Upgrade to TypeChain ethers-v6; move ethers@^6 to peerDep; bump version to 0.0.126-DEV.
  • Tests:
    • Update all specs to bigint, new separators, ethers v6 behaviors, and revised ChainCache schema.

Written by Cursor Bugbot for commit 6aba740. This will update automatically on new commits. Configure here.

@cursor
Copy link

cursor bot commented Nov 21, 2025

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on December 7.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@zavelevsky zavelevsky changed the title Simpler init from json Ethers 6 and Simpler init from json Nov 21, 2025
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

type: eventType,
blockNumber: log.blockNumber,
logIndex: log.logIndex,
logIndex: log.index,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Missing Number() conversion for bigint event arguments

In ethers v6, parsedLog.args.newFeePPM returns a bigint instead of a number. At line 422, this value is assigned to eventData: number without conversion, and at line 434 it's placed into a TradingFeeUpdate tuple which expects number at the third position. Other places in this file (lines 250, 264, 273, 316) correctly use Number() to convert similar bigint values. This inconsistency could cause runtime type mismatches when the event data is consumed elsewhere.

Additional Locations (1)

Fix in Cursor Fix in Web

@zavelevsky zavelevsky merged commit 292e565 into main Dec 9, 2025
7 checks passed
@zavelevsky zavelevsky deleted the simpler-init branch December 9, 2025 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants