Skip to content

feat: add trigger order support to SwiftPlacer#598

Open
ChesterSim wants to merge 5 commits intomasterfrom
chester/be-254-enable-trigger-orders-on-swift
Open

feat: add trigger order support to SwiftPlacer#598
ChesterSim wants to merge 5 commits intomasterfrom
chester/be-254-enable-trigger-orders-on-swift

Conversation

@ChesterSim
Copy link
Copy Markdown

Summary

  • Add support for trigger orders (TRIGGER_MARKET, TRIGGER_LIMIT) and resting limit orders in SwiftPlacer
  • Orders without auction params are placed on-chain without attempting a fill (skip maker fetching, Order construction, and fill ix)
  • Orders with auction params follow the existing place+fill flow unchanged
  • Updated prettyPrintOrderParams to log trigger-relevant fields (triggerPrice, triggerCondition) for non-auction orders

Test plan

  • Verify trigger market orders are placed on-chain without fill attempt
  • Verify trigger limit orders are placed on-chain without fill attempt
  • Verify limit orders without auction params are placed on-chain without fill attempt
  • Verify orders with auction params still follow the existing place+fill flow
  • Verify pre-deposit transactions are forwarded for both auction and non-auction orders
  • Verify validation rejects trigger orders with zero triggerPrice
  • Verify validation rejects limit orders with zero price

🤖 Generated with Claude Code

ChesterSim and others added 3 commits March 31, 2026 14:17
Orders without auction params (trigger/limit) now bypass the fill flow and are placed on-chain directly, with triggerPrice validation for triggerMarket/triggerLimit orders.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Use explicit != null checks for hasAuctionParams to avoid falsy-zero trap on auctionDuration=0
- Forward preDepositTx in place-only path with same fire-and-forget pattern as auction path
- Allow pre-deposit orders to bypass sim errors in place-only path (race condition)
- Remove dead !signedMsgOrderParams.price guard since price is typed as BN (non-nullable)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@ChesterSim ChesterSim deployed to pr-dry-run March 31, 2026 08:13 — with GitHub Actions Active
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.

1 participant