fix(pair): ExpiredLimitParkReason discriminator for parked refunds (#504) #1043

Merged
PlasticDigits merged 3 commits from feat/504-expired-limit-refund-reason into main 2026-08-05 02:17:45 +00:00
PlasticDigits commented 2026-08-05 02:09:51 +00:00 (Migrated from gitlab.com)

Summary

Closes #504.

  • Add on-chain ExpiredLimitParkReason (Expired | DustFilled | ForceCleaned | Blacklisted) to ExpiredLimitRefund / ExpiredLimitRefundResponse
  • Set reason explicitly at each park call site; emit wasm reason= on limit_order_expired_parked (keep historical force_expired for back-compat)
  • Document integrator invariants (park ≠ unfilled; prefer reason over expires_at / force_expired) and add agent playbook skills/AGENTS_EXPIRED_LIMIT_PARK_REASON.md
  • Claim economics unchanged (refund remaining only); no storage-key / execute rename

Test plan

  • make test-contracts green
  • dex-common legacy JSON decode defaults reason=None
  • DustFilled: match_dust_flush_bid_hybrid_then_maker_claims + pair unit dust tests
  • Expired: expired_bid_parked_on_hybrid_walk_claim_refunds_maker
  • ForceCleaned: clean_limit_book_force_dust_bid_then_claim_refunds
  • Blacklisted: blacklisted_maker_resting_limit_not_filled_taker_can_still_swap
  • Claim pause / non-owner / batch claim regressions
  • Optional LocalTerra: place tight rung → consume to dust → LCD expired_limit_refund shows DustFilled

Follow-ups (not in this MR)

  • Indexer parse/split of wasm reason beyond single parked_expired
  • dApp: prefer reason=DustFilled over remaining_escrow < 10 claim-dust heuristic
## Summary Closes [#504](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/504). - Add on-chain `ExpiredLimitParkReason` (`Expired` | `DustFilled` | `ForceCleaned` | `Blacklisted`) to `ExpiredLimitRefund` / `ExpiredLimitRefundResponse` - Set reason explicitly at each park call site; emit wasm `reason=` on `limit_order_expired_parked` (keep historical `force_expired` for back-compat) - Document integrator invariants (park ≠ unfilled; prefer `reason` over `expires_at` / `force_expired`) and add agent playbook `skills/AGENTS_EXPIRED_LIMIT_PARK_REASON.md` - Claim economics unchanged (refund `remaining` only); no storage-key / execute rename ## Test plan - [x] `make test-contracts` green - [x] dex-common legacy JSON decode defaults `reason=None` - [x] DustFilled: `match_dust_flush_bid_hybrid_then_maker_claims` + pair unit dust tests - [x] Expired: `expired_bid_parked_on_hybrid_walk_claim_refunds_maker` - [x] ForceCleaned: `clean_limit_book_force_dust_bid_then_claim_refunds` - [x] Blacklisted: `blacklisted_maker_resting_limit_not_filled_taker_can_still_swap` - [x] Claim pause / non-owner / batch claim regressions - [ ] Optional LocalTerra: place tight rung → consume to dust → LCD `expired_limit_refund` shows `DustFilled` ## Follow-ups (not in this MR) - Indexer parse/split of wasm `reason` beyond single `parked_expired` - dApp: prefer `reason=DustFilled` over `remaining_escrow < 10` claim-dust heuristic
project_80162261_bot_e646d24e9b17aa4b22040bfe08d3fd1c commented 2026-08-05 02:09:54 +00:00 (Migrated from gitlab.com)

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot) to get automatic reviews on future PRs.
PlasticDigits commented 2026-08-05 02:10:02 +00:00 (Migrated from gitlab.com)

mentioned in issue #504

mentioned in issue #504
PlasticDigits commented 2026-08-05 02:15:37 +00:00 (Migrated from gitlab.com)

added 3 commits

  • 3b93a9a7...42f1b455 - 2 commits from branch main
  • 205fbd22 - merge: resolve main conflicts with #505 OrderStatus

Compare with previous version

added 3 commits <ul><li>3b93a9a7...42f1b455 - 2 commits from branch <code>main</code></li><li>205fbd22 - merge: resolve main conflicts with #505 OrderStatus</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/325/diffs?diff_id=1942652795&start_sha=3b93a9a743dd62e98e89c750245cbe9040440300)
project_80162261_bot_e646d24e9b17aa4b22040bfe08d3fd1c commented 2026-08-05 02:15:40 +00:00 (Migrated from gitlab.com)

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot) to get automatic reviews on future PRs.
PlasticDigits commented 2026-08-05 02:17:45 +00:00 (Migrated from gitlab.com)

mentioned in commit ab5da35547

mentioned in commit ab5da355477bc9932ba2d270f9170404350dc1b8
PlasticDigits (Migrated from gitlab.com) merged commit ab5da35547 into main 2026-08-05 02:17:46 +00:00
Sign in to join this conversation.
No reviewers
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!1043
No description provided.