Conversation
size-limit report 📦
|
…to feat/externalOrders
This reverts commit bd9a3fb.
This reverts commit d80d459.
Chore/mark limit orders and nft orders as deprecated
Feat/external orders
| import { assert } from 'ts-essentials'; | ||
|
|
||
| // default deadline = 10 min | ||
| export const DELTA_DEFAULT_EXPIRY = 10 * 60; // seconds |
There was a problem hiding this comment.
Default order expiry silently reduced for all orders
Medium Severity
DELTA_DEFAULT_EXPIRY was changed from 60 * 60 (1 hour) to 10 * 60 (10 minutes) when it was moved from buildDeltaOrderData.ts to misc.ts. This affects all standard delta orders — not just the new external orders — since both buildDeltaSignableOrderData and buildExternalOrderSignableData share this constant. Users who rely on the default deadline without passing an explicit one will see their orders expire 6× faster, which is a significant behavioral change silently bundled into a feature PR about slippage parameters.
Additional Locations (1)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
|
|
||
| export type SimpleFetchSDK = { | ||
| swap: SwapFetchMethods; | ||
| /** @deprecated Limit Orders are deprecated and will be removed in a future version. */ |
There was a problem hiding this comment.
Fetch-only SDK missing external delta order methods
Low Severity
DeltaFetchMethods includes BuildDeltaOrderFunctions and PostDeltaOrderFunctions for regular orders but omits the corresponding BuildExternalDeltaOrderFunctions and PostExternalDeltaOrderFunctions. These external order methods only require ConstructFetchInput (no signer/provider), so they belong in the fetch-only SDK type. Users of SimpleFetchSDK can't build or post external delta orders despite these operations being pure fetch/compute.


Note
Medium Risk
Introduces new Delta order-building semantics (auto-computed amounts via
slippage) and adds a newExternalOrderflow with new typed-data/signing and posting paths, which could impact order correctness/signatures if miscomputed. Changes are mostly additive but touch core Delta order construction and API typing.Overview
Adds slippage-based Delta order building:
buildDeltaOrder/submitDeltaOrdernow acceptslippage(bps) and auto-computesrcAmount/destAmountfor SELL/BUY, centralizing partner-fee and amount resolution in new helpers.Introduces External Delta Orders (handler-executed token logic) via new
build/sign/post/preSign/submitExternalDeltaOrderAPIs, new EIP-712 typed data (ExternalOrder), and updatesDeltaAuctiontyping andgetDeltaOrdersfiltering to includeonChainOrderType.Updates docs and examples to cover external orders, bumps package version to
9.4.0, and marks Limit/NFT order APIs as deprecated (with related snapshot/test fixture cleanup/updates).Written by Cursor Bugbot for commit 8063d1a. This will update automatically on new commits. Configure here.