Skip to content

Feat/drop legacy LOrders#243

Open
Velenir wants to merge 21 commits into
feat/delta-v2from
feat/drop_legacy_LOrders
Open

Feat/drop legacy LOrders#243
Velenir wants to merge 21 commits into
feat/delta-v2from
feat/drop_legacy_LOrders

Conversation

@Velenir

@Velenir Velenir commented Jun 3, 2026

Copy link
Copy Markdown
Member
  • Removing legacy LimitOrders
  • Re-purposing/renaming methods that work for OTC Orders
  • Dropping exports and sdk namespaces for NFT Orders (not yet removing)

closes FRNT-1344


Note

High Risk
Major breaking change for integrators still on limitOrders/nftOrders exports and open limit-order flows; on-chain fill/cancel paths are renamed but still touch AugustusRFQ.

Overview
This is a breaking public API cleanup: legacy limit orders are removed and the surviving EIP-712 RFQ flow is exposed as otcOrders with renamed constructors and methods (buildOTCOrder, submitOTCOrder, getOTCOrders, buildOTCOrderTx, etc.).

constructFullSDK / constructSimpleSDK now expose sdk.otcOrders instead of sdk.limitOrders (and no longer wire sdk.nftOrders). Top-level exports drop limit-order and NFT-order symbols; src/methods/limitOrders/ is deleted and logic lives under src/methods/otcOrders/. Swap transaction types rename limit-order fill inputs to BuildOTCOrderTxInput / BuildSwapAndOTCOrderTxInput.

OTC behavior is narrowed to P2P-style orders: taker is required on build/submit, listing always hits the P2P API path (no type: 'LIMIT' on getOTCOrders), and submitLimitOrder / postLimitOrder / open limit listing are gone. Approvals simplify to maker/taker RFQ approvals (no separate AugustusSwapper taker path for “limit” fills). Examples and viem tests are updated; @types/node is added to devDependencies.

Reviewed by Cursor Bugbot for commit 6625df1. Bugbot is set up for automated code reviews on this repo. Configure here.

@Velenir Velenir requested review from andriy-shymkiv and Copilot June 3, 2026 12:59
@linear

linear Bot commented Jun 3, 2026

Copy link
Copy Markdown

FRNT-1344

Comment thread src/methods/otcOrders/postOrder.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown

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 removes the legacy Limit Orders surface from the SDK and replaces it with a first-class otcOrders API, updating SDK constructors/exports, swap transaction typing/sanitization, and examples/tests accordingly. It also stops exporting NFT order APIs from the main entrypoint (while leaving some internal NFT code paths in place).

Changes:

  • Replace limitOrders (and exported nftOrders) with otcOrders across constructFullSDK / constructSimpleSDK and top-level exports.
  • Update swap transaction types and order sanitization to target OTC orders only (removing NFT/Limit-order branches from BuildTxInput).
  • Migrate examples/tests/snapshots to the new OTC naming and submission flow.

Reviewed changes

Copilot reviewed 32 out of 33 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/viem.test.ts Updates viem integration test to use otcOrders build/sign methods.
tests/snapshots/viem.test.ts.snap Renames snapshot label to OTC order wording.
src/sdk/simple.ts Rewires simple SDK surface from limitOrders/nftOrders to otcOrders.
src/sdk/partial.ts Updates partial SDK type inference to merge OTC order handler types instead of limit/nft.
src/sdk/full.ts Replaces limitOrders/nftOrders in full SDK with otcOrders.
src/methods/swap/transaction.ts Removes NFT/limit-order tx input variants and sanitizes orders via OTC helpers.
src/methods/otcOrders/transaction.ts Renames limit-order tx helpers/types to OTC equivalents and updates rate/tx builders.
src/methods/otcOrders/signOrder.ts Renames signing constructor/types to signOTCOrder.
src/methods/otcOrders/postOrder.ts Adds OTC order POST support (P2P-only posting).
src/methods/otcOrders/index.ts Adds OTC orders “bundled handlers” surface including submitOTCOrder.
src/methods/otcOrders/helpers/types.ts Renames API/types from limit-order naming to OTC naming.
src/methods/otcOrders/helpers/misc.ts Adds OTC order URL/type helpers and order-data sanitization utilities.
src/methods/otcOrders/helpers/buildOrderData.ts Updates OTC order build-data comments/semantics.
src/methods/otcOrders/getOrdersContract.ts Adds OTC order contract getters (AugustusRFQ + TokenTransferProxy).
src/methods/otcOrders/getOrders.ts Implements OTC orders API getters using P2P base URL and updated param types.
src/methods/otcOrders/fillOrderDirectly.ts Renames direct-fill surface for OTC orders (still RFQ-based).
src/methods/otcOrders/cancelOrder.ts Renames cancel functions/types from limit-order naming to OTC naming.
src/methods/otcOrders/buildOrder.ts Renames build functions/types from limit-order naming to OTC naming.
src/methods/otcOrders/approveForOrder.ts Renames approve helpers for OTC orders and simplifies exports.
src/methods/nftOrders/helpers/types.ts Removes unused transaction type alias import/export remnants.
src/methods/nftOrders/getOrdersContract.ts Updates comment to reference OTC orders instead of limit orders.
src/methods/nftOrders/cancelOrder.ts Delegates NFT cancel calls to OTC cancel implementation.
src/methods/limitOrders/postOrder.ts Deletes legacy limit-order posting implementation.
src/methods/limitOrders/index.ts Deletes legacy limit-orders module entrypoint/handlers.
src/methods/limitOrders/getOrdersContract.ts Deletes legacy limit-orders contract getters.
src/methods/common/orders/types.ts Removes OrderTransaction and leaves shared OrderType.
src/methods/common/orders/misc.ts Switches shared order helpers to OTC types for fillability checks.
src/index.ts Updates public exports/types to expose OTC orders and remove limit/nft order exports.
src/examples/viem.ts Migrates viem example to OTC submit/build types and flow.
src/examples/otcOrders_postOrder.ts Migrates posting example from limit orders to OTC orders.
src/examples/otcOrders_partial.ts Migrates partial OTC example from limit orders to OTC orders.
src/examples/otcOrders_all.ts Migrates “all handlers” example from limit orders to OTC orders.
CLAUDE.md Updates repo module overview to reflect otcOrders instead of deprecated limitOrders.
Comments suppressed due to low confidence (9)

src/methods/otcOrders/fillOrderDirectly.ts:17

  • FillOTCOrderFunctions references a misspelled callback type name (FillOTCOrcer). This typo will leak into the generated public .d.ts API and makes the surface harder to discover/search.
    src/methods/otcOrders/fillOrderDirectly.ts:46
  • The exported callback type is misspelled as FillOTCOrcer (likely meant to be FillOTCOrder). Since this type is used by FillOTCOrderFunctions, the typo becomes part of the public type surface.
    src/methods/otcOrders/fillOrderDirectly.ts:214
  • After renaming the callback type to FillOTCOrder, this usage should be updated accordingly to keep the type names consistent.
    src/methods/otcOrders/buildOrder.ts:23
  • Typo in the JSDoc: "excuted" → "executed".
    src/methods/otcOrders/getOrders.ts:18
  • OTCOrderType is imported but never used, which will typically fail linting in this repo (and adds noise for readers).
    src/methods/otcOrders/getOrders.ts:80
  • Use single quotes for string literals to match the repo Prettier config (singleQuote: true in .prettierrc).
    src/methods/otcOrders/helpers/types.ts:23
  • Typo in comment: "PARTIALLY_FILLLED" → "PARTIALLY_FILLED".
    src/methods/otcOrders/approveForOrder.ts:26
  • Typo in comment: "TokenTransaferProxy" → "TokenTransferProxy".
    src/methods/otcOrders/approveForOrder.ts:11
  • The JSDoc for approveTakerTokenForOTCOrder says it approves AugustusRFQ for direct order filling, but the implementation delegates to constructApproveToken (swap spender / TokenTransferProxy). The comment should reflect the actual spender/use-case (swap-based OTC order tx building).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/methods/swap/transaction.ts Outdated
Comment thread src/examples/viem.ts Outdated
Comment thread src/examples/otcOrders_all.ts Outdated
Comment thread src/examples/otcOrders_partial.ts Outdated
Comment thread CLAUDE.md
Comment thread src/methods/otcOrders/cancelOrder.ts Outdated
Comment thread src/methods/otcOrders/getOrders.ts Outdated
LimitOrdersApiResponse,
LimitOrderType,
OTCOrderFromApi,
OTCOrdersApiResponse,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would be good to match OTCOrdersApiResponse with PaginatedResponse<DeltaAuction>, for consistency

@Velenir Velenir Jun 3, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Can't
OTCOrdersApiResponse has offset as the driving force of pagination, whereas your Paginated has page
Mapping offset to page would be very artificial and ultimately a lie

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a194e51. Configure here.

Comment thread src/methods/otcOrders/approveForOrder.ts Outdated
Comment thread tests/viem.test.ts
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

size-limit report 📦

Path Size
dist/sdk.cjs.production.min.js 16.64 KB (-4.28% 🔽)
dist/sdk.esm.js 16.85 KB (-4.13% 🔽)

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.

3 participants