-
Notifications
You must be signed in to change notification settings - Fork 112
Feat/Crosschain LOs #219
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
Feat/Crosschain LOs #219
Conversation
size-limit report 📦
|
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.
Pull request overview
This PR adds support for crosschain delta limit orders by introducing bridge filtering and configuration options.
- Adds new bridge filtering parameters (
includeBridges,excludeBridges) togetDeltaPricefor controlling which bridges can be used - Adds
allowBridgeAndSwapparameter to control whether swaps on destination chain are allowed after bridging - Adds
getBridgeProtocolsfunction to retrieve available bridge protocols and enhancesgetBridgeInfowith filtering capabilities - Removes restrictive
ProtocolNameunion type in favor of flexible string type for bridge protocol names
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Version bump to 9.3.0-dev.1 for new crosschain limit order features |
| src/methods/delta/helpers/types.ts | Changes protocolName from union type to string for flexibility with new bridge protocols |
| src/methods/delta/getDeltaPrice.ts | Adds bridge filtering parameters (includeBridges, excludeBridges, allowBridgeAndSwap) and documentation for bridge-specific fields |
| src/methods/delta/getBridgeInfo.ts | Adds getBridgeProtocols function and enhances getBridgeInfo with filtering parameters |
| tests/delta.test.ts | Adds tests for getBridgeInfo and getBridgeProtocols functions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/methods/delta/getBridgeInfo.ts
Outdated
| type BridgeProtocolResponse = { | ||
| protocol: string; | ||
| displayName: string; | ||
| }; |
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.
Let's export this type from SDK? For the consistency with BridgeInfo
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| type GetBridgeInfo = ( | ||
| params?: GetBridgeInfoParams, | ||
| requestParams?: RequestParameters | ||
| ) => Promise<BridgeInfo>; |
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.
Breaking API change in getBridgeInfo silently ignores request params
Medium Severity
The getBridgeInfo function signature changed from (requestParams?) to (params?, requestParams?). Existing callers who pass RequestParameters (like { signal: abortController.signal }) as the first argument now have those values interpreted as GetBridgeInfoParams instead. The abort signal and other request options are silently ignored, breaking request cancellation functionality. This is a breaking change introduced in a minor version bump (9.2.1 → 9.3.0).
Support for Crosschain Delta Limit Orders
Note
Enhances Delta cross-chain functionality and surfaces bridge metadata.
getBridgeInfonow acceptsallowBridgeAndSwapandbridgesfilters; newgetBridgeProtocolsreturns available bridges (protocol,displayName).getDeltaPricesupportsincludeBridges/excludeBridgesandallowBridgeAndSwapin query; response typing updated.BridgeProtocolResponse; relaxBridgePriceInfo.protocolNametostring.partnerAndFeeexpectation (512) and stabilize route snapshots; skip several heavy integration tests.9.3.0and@paraswap/coreto2.4.1.Written by Cursor Bugbot for commit 0e5c219. This will update automatically on new commits. Configure here.