Skip to content

feat(client): support PolyV2 CLOB order placement - #281

Draft
cesarenaldi wants to merge 5 commits into
mainfrom
codex/dev-544-clob-order-support
Draft

feat(client): support PolyV2 CLOB order placement#281
cesarenaldi wants to merge 5 commits into
mainfrom
codex/dev-544-clob-order-support

Conversation

@cesarenaldi

@cesarenaldi cesarenaldi commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements the CLOB phase of DEV-544, stacked on #280.

  • accepts exactly one of tokenId or positionId when preparing, creating, or placing market and limit orders
  • preserves that identity through market metadata, fee, order-book, balance, and allowance lookups
  • keeps token-ID orders on the CTF Exchange V2/negative-risk routing path
  • routes position-ID orders through exchangeV3, Exchange V3 typed-data signing, and positionManager sell approvals
  • keeps the signed/wire order field named tokenId, containing either the requested token ID or position ID as required by the protocol
  • retains the existing tokenId order input without deprecation or caller-supplied protocol flags
  • keeps unrestricted 64-bit salt generation local to RFQ while ordinary CLOB orders retain their 53-bit-safe salt generator
  • validates singular and batched CLOB order salts before JavaScript-number wire serialization

The broader CLOB market-data rename to assetId is intentionally deferred to the following phase.

Validation

  • pnpm build
  • pnpm lint
  • pnpm typecheck
  • pnpm test:client (39 files, 297 tests)
  • generated declaration inspection

@cesarenaldi
cesarenaldi force-pushed the codex/dev-544-clob-order-support branch from f95c114 to 4e65158 Compare August 7, 2026 13:18
@cesarenaldi
cesarenaldi force-pushed the codex/dev-544-gamma-support branch from 360f7b3 to dd427eb Compare August 7, 2026 13:42
@cesarenaldi
cesarenaldi force-pushed the codex/dev-544-clob-order-support branch 2 times, most recently from 5051cc1 to 4d6c22b Compare August 7, 2026 16:51
@cesarenaldi
cesarenaldi force-pushed the codex/dev-544-clob-order-support branch from 4d6c22b to 7d6fe6a Compare August 7, 2026 17:38
Base automatically changed from codex/dev-544-gamma-support to main August 10, 2026 17:20
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