feat(pair): typed OrderStatus query over existing maps (Active / ParkedRefund / Unknown) #505

Closed
opened 2026-08-05 00:31:08 +00:00 by PlasticDigits · 10 comments
PlasticDigits commented 2026-08-05 00:31:08 +00:00 (Migrated from gitlab.com)

Summary

Add a read-only typed order-status query on the pair that classifies an order_id from existing storage only:

Check Result status
ORDERS.may_load(order_id) → Some Active
else EXPIRED_LIMIT_CLAIMS.may_load(order_id) → Some ParkedRefund
else Unknown

Out of scope (explicitly rejected): tombstones, owner shadow index (OWNER_ORDERS), migration / permissionless backfill, Protocol {} capability negotiation, permanent terminal history, any execute-path dual-writes, any taker/maker gas increase, any permanent state growth.

Context: third-party grid vault consumers (e.g. RenneBeau/CL8Y-DeX-bot-and-liquidity-contracts#45 and the closed heavy PR PlasticDigits/cl8y-dex-terraclassic#1) need absence as a typed value, not an untyped CosmWasm query error. Upstream accepts only this cheap read-only slice.


Current codebase

Query surface today

Canonical msgs live in smartcontracts/packages/dex-common/src/pair.rs (QueryMsg), handled in smartcontracts/contracts/pair/src/contract.rs.

Relevant variants today:

  • QueryMsg::LimitOrder { order_id } → LimitOrderResponse via orderbook::load_order_response, which uses ORDERS.load. Missing key → StdError::not_found (untyped error). Return type is not Option.
  • QueryMsg::ExpiredLimitRefund { order_id } → Option<ExpiredLimitRefundResponse> via EXPIRED_LIMIT_CLAIMS.may_load. Missing key → None (typed absence).

Storage / lifecycle (unchanged by this issue)

Map Purpose
ORDERS ("limit_orders") Resting book rows
EXPIRED_LIMIT_CLAIMS ("exp_limit_cl") Parked expiry / dust / clean / blacklist refunds awaiting claim

Lifecycle today (must remain unchanged):

  • Full fill → unlink_order → ORDERS.remove (no residual row).
  • Cancel → unlink + immediate CW20 refund (no residual row).
  • Expiry / dust / force-clean / blacklist park → unlink + row in EXPIRED_LIMIT_CLAIMS.
  • Claim parked refund → EXPIRED_LIMIT_CLAIMS.remove.

There is no on-chain status enum, no owner index, no terminal tombstone. Contract callers cannot safely treat LimitOrder query failure as “order gone / filled.”

Precedents

ExpiredLimitRefund already demonstrates typed absence (Option). This feature extends that pattern to a unified lifecycle lookup without inventing new write paths.


Why this is needed

Contract consumers (custody vaults, bots, multi-contract strategies) that hold local order IDs must distinguish:

  1. Still on book (Active) — may cancel / update.
  2. Parked refund exists (ParkedRefund) — must claim via ClaimExpiredLimitOrder(s).
  3. No live custody row (Unknown) — filled, cancelled, never existed, claimed, or pre-dating any future history — without conflating that with LCD/transport/schema/StdError failures.

Today, path (3) and real query failures look the same when using LimitOrder, so safe vaults fail-closed and can deadlock settlement after a full fill removes the row. Off-chain indexers can use events; on-chain contracts cannot.

This issue does not promise to distinguish FullyExecuted vs Cancelled vs “never existed.” Callers that need that distinction must keep their own ledger (they placed/cancelled the orders) or use off-chain indexing. Upstream will not pay permanent tombstones / chain bloat for that.


Constraints / guardrails

  1. Read-only. No new ExecuteMsg, no changes to swap / place / cancel / claim / clean / match paths, no dual-writes.
  2. No new persistent state. No new Map/Item, no migrate backfill, no tombstones, no OWNER_ORDERS, no generation/ready flags.
  3. No gas impact on takers or makers beyond the new query itself (queries are free of state writes; do not add storage ops to matching).
  4. Transport / contract / deserialization failures remain errors. Never map a failed wasm query or JSON decode into Unknown. Only a successful query response may carry Unknown.
  5. Do not weaken existing queries. Keep LimitOrder and ExpiredLimitRefund behavior for backward compatibility (error vs Option as today). Add a new query variant.
  6. No Protocol {} / feature-flag negotiation surface in this issue. Schema is the shared dex_common types; versioning via normal contract release / cw2 if needed later, not a runtime capability menu.
  7. Do not invent terminal subtypes (FullyExecuted, Cancelled, NotFound as separate statuses). Use a single non-custody bucket: Unknown (name preferred over NotFound to avoid implying the id was never valid).
  8. Priority when both maps somehow contain the same id: treat as invariant violation territory — prefer fail-hard in tests / document that Active is checked first and parked should never coexist. Do not silently merge.
  9. Scope authority: PlasticDigits owns the schema in this repo. Do not copy the rejected PR’s OrderStatusV1 / tombstone / owner-inventory API wholesale.
  10. Keep response small. Status + fields already available from the winning map (owner, side, price, remaining, expires_at as applicable). No terminal height/time (those require tombstones).

Relevant files

Area Path
Shared API smartcontracts/packages/dex-common/src/pair.rs (QueryMsg, new enums/response types)
Pair re-exports smartcontracts/contracts/pair/src/msg.rs
Query dispatch / handler smartcontracts/contracts/pair/src/contract.rs (query, new helper)
Order load helper (reference only) smartcontracts/contracts/pair/src/orderbook.rs (load_order_response)
Storage maps smartcontracts/contracts/pair/src/state.rs (ORDERS, EXPIRED_LIMIT_CLAIMS, LimitOrder, ExpiredLimitRefund)
Integration tests smartcontracts/tests/src/limit_order_tests.rs (and/or a focused new test module if preferred)
Docs (if query catalog exists) pair README / docs/ limit-order query notes — only if already documenting QueryMsg

Indexer / frontend: optional follow-up, not required for acceptance (contracts are the primary consumer).


  1. In dex_common::pair, add something like:

    #[cw_serde]
    pub enum OrderStatus {
        Active,
        ParkedRefund,
        Unknown,
    }
    
    #[cw_serde]
    pub struct OrderStatusResponse {
        pub order_id: u64,
        pub status: OrderStatus,
        pub owner: Option<Addr>,
        pub side: Option<LimitOrderSide>,
        pub price: Option<Decimal>,   // from active order; parked rows today may lack price — use Option
        pub remaining: Option<Uint128>,
        pub expires_at: Option<u64>,
    }
    

    Exact field optionality should mirror what each map can supply today (ExpiredLimitRefund currently has no price in upstream state — do not expand parked storage in this issue just to populate price).

  2. Add QueryMsg variant, e.g. OrderStatus { order_id: u64 } with #[returns(OrderStatusResponse)]. Prefer a plain name without V1 suffix unless a strong reason appears during implementation.

  3. Handler logic (pseudo):

    if order_id == 0 → StdError (reject invalid id; same spirit as positive ids elsewhere)
    if let Some(o) = ORDERS.may_load(...) → Active + fields from LimitOrder
    else if let Some(r) = EXPIRED_LIMIT_CLAIMS.may_load(...) → ParkedRefund + fields from ExpiredLimitRefund
    else → Unknown with metadata Options none
    
  4. Wire into query() match; re-export types from pair msg.rs as needed.

  5. Bump pair crate / cw2 version only if this repo’s release process requires it for any query-shape change; prefer minimal versioning consistent with prior additive query additions.

  6. Do not change LimitOrder to return Option in this issue (breaking for some clients); the new query is the safe path for contract callers.


Acceptance criteria

  • New query returns Active with correct metadata for a resting bid and ask.
  • New query returns ParkedRefund with correct metadata after park (expiry walk, dust, and/or CleanLimitBook — cover at least one park path thoroughly; others may be lighter).
  • New query returns Unknown (success, not Err) for: never-used id, fully filled id, cancelled id, and claimed-parked id.
  • Existing LimitOrder still errors on missing id; ExpiredLimitRefund still returns None when absent.
  • No new storage keys; git grep / review confirms no ORDER_TOMB, OWNER_ORDERS, backfill cursor, or execute dual-write hooks.
  • Swap / place / cancel / claim gas paths unchanged (no extra save/remove for inventory).
  • Workspace unit + pair integration tests covering the matrix below pass; clippy -D warnings clean for touched crates.
  • Public types live in dex_common so external contracts can depend on the schema without forking pair internals.

Test plan (functional paths)

# Setup Query Expected
T1 Place bid OrderStatus Active, owner/side/price/remaining/expires match LimitOrder
T2 Place ask OrderStatus Active, ask fields correct
T3 Partial fill OrderStatus still Active, remaining decreased
T4 Full fill (hybrid swap exhausts order) OrderStatus Unknown; LimitOrder still errors
T5 Cancel OrderStatus Unknown
T6 Batch cancel each id → Unknown
T7 Park via expiry-on-walk (or clean) OrderStatus ParkedRefund; ExpiredLimitRefund is Some
T8 Claim parked OrderStatus Unknown; ExpiredLimitRefund is None
T9 Batch claim each id → Unknown
T10 Fresh unused order_id (e.g. ORDER_NEXT_ID or large id) OrderStatus Unknown
T11 order_id == 0 OrderStatus Err (not Unknown)
T12 Price update while active still Active, new price reflected
T13 After migrate from prior pair version (if migrate tests exist) new query works; no backfill required ready immediately

Unit-level: direct handler tests with mock storage for Active / Parked / empty maps without full app harness where useful.


Test plan (attack / abuse / misuse vectors)

Vector Concern Expected
A1 Caller treats LCD/ContractQuery failure as Unknown Document + tests only assert successful JSON decode of OrderStatusResponse; failures stay Err. No code path converts StdError → Unknown.
A2 Probe random / future order ids to enumerate book Same as today with LimitOrder/ExpiredLimitRefund; status query must not leak extra private data. Unknown for absent ids is intentional. Rate limits are chain-level, not contract.
A3 Spoof metadata on Unknown Response must not invent owner/side/remaining when status is Unknown.
A4 Assume Unknown ⇒ fully filled (theft of settlement logic) Docs/issue constraints state Unknown is non-custody only; vaults must not unlock solely on Unknown without their own cancel ledger. Optional comment on response type.
A5 Race: fill between local check and cancel Unchanged execute semantics; status is point-in-time read. No new TOCTOU beyond existing cancel-on-missing behavior.
A6 Invariant break: same id in both maps Prefer hard error or panic-in-test if constructible in unit tests; production handler: Active first is acceptable if dual presence is impossible by construction — add a unit test that documents the priority.
A7 Schema confusion with third-party fork (OrderStatusV1, tombstones) Our type names/fields must not claim FullyExecuted/Cancelled/NotFound or schema_version negotiation that auto-enables foreign vaults. Keep API clearly narrower.
A8 Query gas grief via huge id space Single map lookups only; no range scans.
A9 Pause state Status query remains available while paused (read-only); cancel/claim still gated as today. Assert query works when IsPaused is true.

Verification criteria

Done when:

  1. Additive query is merged and covered by the functional matrix (T1–T13) and abuse cases A1, A3, A6, A7, A8, A9 at minimum in automated tests or explicit review checklist.
  2. Diff contains no new persistent maps/items and no execute-path inventory writes (reviewer sign-off).
  3. make test-contracts (or project-equivalent pair + dex-common tests) passes; clippy clean on touched packages.
  4. Brief note in PR description: contract callers should use OrderStatus; Unknown ≠ proof of fill; no tombstones by design.
  5. No dependency on third-party fork patches; schema defined only in this repository’s dex_common.

Non-goals (do not sneak in)

  • Owner inventory pagination / OwnerInventory
  • ContinueOwnerIndexBackfill / OWNER_INDEX_*
  • ORDER_TOMBSTONES / terminal height-time
  • PairProtocolResponse / PairApiFeature
  • Changing LimitOrder error semantics
  • Indexer schema work (separate issue if desired later)
## Summary Add a **read-only** typed order-status query on the pair that classifies an `order_id` from **existing** storage only: | Check | Result status | |-------|----------------| | `ORDERS.may_load(order_id)` → `Some` | `Active` | | else `EXPIRED_LIMIT_CLAIMS.may_load(order_id)` → `Some` | `ParkedRefund` | | else | `Unknown` | **Out of scope (explicitly rejected):** tombstones, owner shadow index (`OWNER_ORDERS`), migration / permissionless backfill, `Protocol {}` capability negotiation, permanent terminal history, any execute-path dual-writes, any taker/maker gas increase, any permanent state growth. Context: third-party grid vault consumers (e.g. [RenneBeau/CL8Y-DeX-bot-and-liquidity-contracts#45](https://github.com/RenneBeau/CL8Y-DeX-bot-and-liquidity-contracts/issues/45) and the closed heavy PR [PlasticDigits/cl8y-dex-terraclassic#1](https://github.com/PlasticDigits/cl8y-dex-terraclassic/pull/1)) need absence as a **typed value**, not an untyped CosmWasm query error. Upstream accepts only this cheap read-only slice. --- ## Current codebase ### Query surface today Canonical msgs live in `smartcontracts/packages/dex-common/src/pair.rs` (`QueryMsg`), handled in `smartcontracts/contracts/pair/src/contract.rs`. Relevant variants today: - `QueryMsg::LimitOrder { order_id }` → `LimitOrderResponse` via `orderbook::load_order_response`, which uses **`ORDERS.load`**. Missing key → **`StdError::not_found`** (untyped error). Return type is not `Option`. - `QueryMsg::ExpiredLimitRefund { order_id }` → `Option<ExpiredLimitRefundResponse>` via **`EXPIRED_LIMIT_CLAIMS.may_load`**. Missing key → **`None`** (typed absence). ### Storage / lifecycle (unchanged by this issue) | Map | Purpose | |-----|---------| | `ORDERS` (`"limit_orders"`) | Resting book rows | | `EXPIRED_LIMIT_CLAIMS` (`"exp_limit_cl"`) | Parked expiry / dust / clean / blacklist refunds awaiting claim | Lifecycle today (must remain unchanged): - Full fill → `unlink_order` → `ORDERS.remove` (no residual row). - Cancel → unlink + immediate CW20 refund (no residual row). - Expiry / dust / force-clean / blacklist park → unlink + row in `EXPIRED_LIMIT_CLAIMS`. - Claim parked refund → `EXPIRED_LIMIT_CLAIMS.remove`. There is **no** on-chain status enum, **no** owner index, **no** terminal tombstone. Contract callers cannot safely treat `LimitOrder` query failure as “order gone / filled.” ### Precedents `ExpiredLimitRefund` already demonstrates typed absence (`Option`). This feature extends that pattern to a unified lifecycle lookup without inventing new write paths. --- ## Why this is needed Contract consumers (custody vaults, bots, multi-contract strategies) that hold local order IDs must distinguish: 1. **Still on book** (`Active`) — may cancel / update. 2. **Parked refund exists** (`ParkedRefund`) — must claim via `ClaimExpiredLimitOrder(s)`. 3. **No live custody row** (`Unknown`) — filled, cancelled, never existed, claimed, or pre-dating any future history — **without** conflating that with LCD/transport/schema/`StdError` failures. Today, path (3) and real query failures look the same when using `LimitOrder`, so safe vaults fail-closed and can deadlock settlement after a full fill removes the row. Off-chain indexers can use events; **on-chain contracts cannot**. This issue does **not** promise to distinguish `FullyExecuted` vs `Cancelled` vs “never existed.” Callers that need that distinction must keep their own ledger (they placed/cancelled the orders) or use off-chain indexing. Upstream will not pay permanent tombstones / chain bloat for that. --- ## Constraints / guardrails 1. **Read-only.** No new `ExecuteMsg`, no changes to swap / place / cancel / claim / clean / match paths, no dual-writes. 2. **No new persistent state.** No new `Map`/`Item`, no migrate backfill, no tombstones, no `OWNER_ORDERS`, no generation/ready flags. 3. **No gas impact on takers or makers** beyond the new query itself (queries are free of state writes; do not add storage ops to matching). 4. **Transport / contract / deserialization failures remain errors.** Never map a failed wasm query or JSON decode into `Unknown`. Only a successful query response may carry `Unknown`. 5. **Do not weaken existing queries.** Keep `LimitOrder` and `ExpiredLimitRefund` behavior for backward compatibility (error vs `Option` as today). Add a **new** query variant. 6. **No `Protocol {}` / feature-flag negotiation surface** in this issue. Schema is the shared `dex_common` types; versioning via normal contract release / cw2 if needed later, not a runtime capability menu. 7. **Do not invent terminal subtypes** (`FullyExecuted`, `Cancelled`, `NotFound` as separate statuses). Use a single non-custody bucket: **`Unknown`** (name preferred over `NotFound` to avoid implying the id was never valid). 8. **Priority when both maps somehow contain the same id:** treat as invariant violation territory — prefer fail-hard in tests / document that `Active` is checked first and parked should never coexist. Do not silently merge. 9. **Scope authority:** PlasticDigits owns the schema in this repo. Do not copy the rejected PR’s `OrderStatusV1` / tombstone / owner-inventory API wholesale. 10. **Keep response small.** Status + fields already available from the winning map (owner, side, price, remaining, expires_at as applicable). No terminal height/time (those require tombstones). --- ## Relevant files | Area | Path | |------|------| | Shared API | `smartcontracts/packages/dex-common/src/pair.rs` (`QueryMsg`, new enums/response types) | | Pair re-exports | `smartcontracts/contracts/pair/src/msg.rs` | | Query dispatch / handler | `smartcontracts/contracts/pair/src/contract.rs` (`query`, new helper) | | Order load helper (reference only) | `smartcontracts/contracts/pair/src/orderbook.rs` (`load_order_response`) | | Storage maps | `smartcontracts/contracts/pair/src/state.rs` (`ORDERS`, `EXPIRED_LIMIT_CLAIMS`, `LimitOrder`, `ExpiredLimitRefund`) | | Integration tests | `smartcontracts/tests/src/limit_order_tests.rs` (and/or a focused new test module if preferred) | | Docs (if query catalog exists) | pair README / `docs/` limit-order query notes — only if already documenting `QueryMsg` | Indexer / frontend: **optional follow-up**, not required for acceptance (contracts are the primary consumer). --- ## Recommended direction 1. In `dex_common::pair`, add something like: ```rust #[cw_serde] pub enum OrderStatus { Active, ParkedRefund, Unknown, } #[cw_serde] pub struct OrderStatusResponse { pub order_id: u64, pub status: OrderStatus, pub owner: Option<Addr>, pub side: Option<LimitOrderSide>, pub price: Option<Decimal>, // from active order; parked rows today may lack price — use Option pub remaining: Option<Uint128>, pub expires_at: Option<u64>, } ``` Exact field optionality should mirror what each map can supply today (`ExpiredLimitRefund` currently has no `price` in upstream state — do not expand parked storage in this issue just to populate price). 2. Add `QueryMsg` variant, e.g. `OrderStatus { order_id: u64 }` with `#[returns(OrderStatusResponse)]`. Prefer a plain name without `V1` suffix unless a strong reason appears during implementation. 3. Handler logic (pseudo): ```text if order_id == 0 → StdError (reject invalid id; same spirit as positive ids elsewhere) if let Some(o) = ORDERS.may_load(...) → Active + fields from LimitOrder else if let Some(r) = EXPIRED_LIMIT_CLAIMS.may_load(...) → ParkedRefund + fields from ExpiredLimitRefund else → Unknown with metadata Options none ``` 4. Wire into `query()` match; re-export types from pair `msg.rs` as needed. 5. Bump pair crate / cw2 version only if this repo’s release process requires it for any query-shape change; prefer minimal versioning consistent with prior additive query additions. 6. **Do not** change `LimitOrder` to return `Option` in this issue (breaking for some clients); the new query is the safe path for contract callers. --- ## Acceptance criteria - [ ] New query returns `Active` with correct metadata for a resting bid and ask. - [ ] New query returns `ParkedRefund` with correct metadata after park (expiry walk, dust, and/or `CleanLimitBook` — cover at least one park path thoroughly; others may be lighter). - [ ] New query returns `Unknown` (success, not `Err`) for: never-used id, fully filled id, cancelled id, and claimed-parked id. - [ ] Existing `LimitOrder` still errors on missing id; `ExpiredLimitRefund` still returns `None` when absent. - [ ] No new storage keys; `git grep` / review confirms no `ORDER_TOMB`, `OWNER_ORDERS`, backfill cursor, or execute dual-write hooks. - [ ] Swap / place / cancel / claim gas paths unchanged (no extra `save`/`remove` for inventory). - [ ] Workspace unit + pair integration tests covering the matrix below pass; clippy `-D warnings` clean for touched crates. - [ ] Public types live in `dex_common` so external contracts can depend on the schema without forking pair internals. --- ## Test plan (functional paths) | # | Setup | Query | Expected | |---|--------|-------|----------| | T1 | Place bid | `OrderStatus` | `Active`, owner/side/price/remaining/expires match `LimitOrder` | | T2 | Place ask | `OrderStatus` | `Active`, ask fields correct | | T3 | Partial fill | `OrderStatus` | still `Active`, remaining decreased | | T4 | Full fill (hybrid swap exhausts order) | `OrderStatus` | `Unknown`; `LimitOrder` still errors | | T5 | Cancel | `OrderStatus` | `Unknown` | | T6 | Batch cancel | each id → `Unknown` | | T7 | Park via expiry-on-walk (or clean) | `OrderStatus` | `ParkedRefund`; `ExpiredLimitRefund` is `Some` | | T8 | Claim parked | `OrderStatus` | `Unknown`; `ExpiredLimitRefund` is `None` | | T9 | Batch claim | each id → `Unknown` | | T10 | Fresh unused `order_id` (e.g. `ORDER_NEXT_ID` or large id) | `OrderStatus` | `Unknown` | | T11 | `order_id == 0` | `OrderStatus` | `Err` (not `Unknown`) | | T12 | Price update while active | still `Active`, new price reflected | | T13 | After migrate from prior pair version (if migrate tests exist) | new query works; no backfill required | ready immediately | Unit-level: direct handler tests with mock storage for Active / Parked / empty maps without full app harness where useful. --- ## Test plan (attack / abuse / misuse vectors) | Vector | Concern | Expected | |--------|---------|----------| | A1 | Caller treats LCD/`ContractQuery` failure as `Unknown` | Document + tests only assert **successful** JSON decode of `OrderStatusResponse`; failures stay `Err`. No code path converts `StdError` → `Unknown`. | | A2 | Probe random / future order ids to enumerate book | Same as today with `LimitOrder`/`ExpiredLimitRefund`; status query must not leak extra private data. `Unknown` for absent ids is intentional. Rate limits are chain-level, not contract. | | A3 | Spoof metadata on `Unknown` | Response must not invent owner/side/remaining when status is `Unknown`. | | A4 | Assume `Unknown` ⇒ fully filled (theft of settlement logic) | Docs/issue constraints state `Unknown` is non-custody only; vaults must not unlock solely on `Unknown` without their own cancel ledger. Optional comment on response type. | | A5 | Race: fill between local check and cancel | Unchanged execute semantics; status is point-in-time read. No new TOCTOU beyond existing cancel-on-missing behavior. | | A6 | Invariant break: same id in both maps | Prefer hard error or panic-in-test if constructible in unit tests; production handler: `Active` first is acceptable if dual presence is impossible by construction — add a unit test that documents the priority. | | A7 | Schema confusion with third-party fork (`OrderStatusV1`, tombstones) | Our type names/fields must not claim `FullyExecuted`/`Cancelled`/`NotFound` or `schema_version` negotiation that auto-enables foreign vaults. Keep API clearly narrower. | | A8 | Query gas grief via huge id space | Single map lookups only; no range scans. | | A9 | Pause state | Status query remains available while paused (read-only); cancel/claim still gated as today. Assert query works when `IsPaused` is true. | --- ## Verification criteria Done when: 1. Additive query is merged and covered by the functional matrix (T1–T13) and abuse cases A1, A3, A6, A7, A8, A9 at minimum in automated tests or explicit review checklist. 2. Diff contains **no** new persistent maps/items and **no** execute-path inventory writes (reviewer sign-off). 3. `make test-contracts` (or project-equivalent pair + dex-common tests) passes; clippy clean on touched packages. 4. Brief note in PR description: contract callers should use `OrderStatus`; `Unknown` ≠ proof of fill; no tombstones by design. 5. No dependency on third-party fork patches; schema defined only in this repository’s `dex_common`. --- ## Non-goals (do not sneak in) - Owner inventory pagination / `OwnerInventory` - `ContinueOwnerIndexBackfill` / `OWNER_INDEX_*` - `ORDER_TOMBSTONES` / terminal height-time - `PairProtocolResponse` / `PairApiFeature` - Changing `LimitOrder` error semantics - Indexer schema work (separate issue if desired later)
PlasticDigits commented 2026-08-05 02:03:10 +00:00 (Migrated from gitlab.com)

mentioned in commit eb9372544a

mentioned in commit eb9372544aca8c4b89dedebb0886abb9c1e2c39b
PlasticDigits commented 2026-08-05 02:03:22 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1042

mentioned in merge request !1042
PlasticDigits commented 2026-08-05 02:03:29 +00:00 (Migrated from gitlab.com)

Implementation landed in !1042 (feat/505-order-status-query).

Acceptance criteria

  • Active for resting bid and ask
  • ParkedRefund after CleanLimitBook park (thorough); claim → Unknown
  • Unknown (success) for unused / full fill / cancel / claimed; batch cancel/claim covered
  • LimitOrder still errors; ExpiredLimitRefund still None when absent
  • No new storage keys / tombstones / OWNER_ORDERS / execute dual-writes
  • Unit + integration matrix + clippy clean; types in dex_common
  • Docs: L21, limit-orders, integrators, skills/AGENTS_ORDER_STATUS_QUERY.md

Not in this MR (issue non-goals / optional)

  • Indexer HTTP proxy for OrderStatus
  • Dust / expiry-on-walk park paths beyond CleanLimitBook (same parked map; covered via clean)
  • Terminal subtypes / Protocol capability negotiation
Implementation landed in !1042 (`feat/505-order-status-query`). ### Acceptance criteria - [x] Active for resting bid and ask - [x] ParkedRefund after CleanLimitBook park (thorough); claim → Unknown - [x] Unknown (success) for unused / full fill / cancel / claimed; batch cancel/claim covered - [x] LimitOrder still errors; ExpiredLimitRefund still None when absent - [x] No new storage keys / tombstones / OWNER_ORDERS / execute dual-writes - [x] Unit + integration matrix + clippy clean; types in dex_common - [x] Docs: L21, limit-orders, integrators, skills/AGENTS_ORDER_STATUS_QUERY.md ### Not in this MR (issue non-goals / optional) - Indexer HTTP proxy for OrderStatus - Dust / expiry-on-walk park paths beyond CleanLimitBook (same parked map; covered via clean) - Terminal subtypes / Protocol capability negotiation
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-08-05 02:05:59 +00:00
PlasticDigits commented 2026-08-05 02:06:37 +00:00 (Migrated from gitlab.com)

mentioned in commit 42f1b455d4

mentioned in commit 42f1b455d4556d6ffca8990920e498c87d8ea179
PlasticDigits commented 2026-08-05 02:15:34 +00:00 (Migrated from gitlab.com)

mentioned in commit 205fbd222a

mentioned in commit 205fbd222a7b3e35eed1c320815e98c7a57cdb5c
PlasticDigits commented 2026-08-16 07:14:04 +00:00 (Migrated from gitlab.com)

mentioned in issue #530

mentioned in issue #530
PlasticDigits commented 2026-08-17 10:26:08 +00:00 (Migrated from gitlab.com)

mentioned in issue #546

mentioned in issue #546
PlasticDigits commented 2026-08-22 12:26:37 +00:00 (Migrated from gitlab.com)

mentioned in issue #597

mentioned in issue #597
PlasticDigits commented 2026-09-01 08:14:36 +00:00 (Migrated from gitlab.com)

mentioned in issue #717

mentioned in issue #717
PlasticDigits commented 2026-09-01 08:14:39 +00:00 (Migrated from gitlab.com)

marked as related to #717

marked as related to #717
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic#505
No description provided.