Claim all parked follow-up: Playwright expiry-park E2E + confirm-dialog gas estimate (#253) #259
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#259
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Follow-up to GitLab #253 (Claim all parked UI, merged). Two related gaps remain:
parked_expired→ Claim all parked →claim_expired_limit_orderspath.window.confirmwith count-only copy; batch cancel/ladder flows already surface estimated LUNC gas elsewhere.Bundle both under one issue because they harden the same user action (batch parked refund confirm + on-chain verification).
Current codebase
Claim all parked UI (#253 — shipped)
frontend-dapp/src/components/trade/LimitOrderMyPlacementsPanel.tsx— Claim all parked (N) when N ≥ 2parked_expiredrows; chunks at 30 ids;window.confirmviaconfirmExpiredClaimBatchMessage.useLimitExpiredClaimMutation→claimExpiredLimitOrder/claimExpiredLimitOrdersinpair.ts.gasLimitForLimitOrderCancelBatch(n)+estimateFeeUlunaAmountForGasLimitinterraGas.ts(400k + 80k×N; same as batch cancel — #246).Limit order Playwright E2E (no expiry-park harness)
frontend-dapp/e2e/limit-orders-tx.spec.ts— place, cancel, 5-rung ladder; assertsplace_limit_order,cancel_limit_order,place_limit_order_batch.frontend-dapp/e2e/helpers/limit-e2e.ts,lcd.ts— pair pick, pause guard, submit helpers.skills/AGENTS_E2E_LIMIT_ORDERS_TX.md— strict chain,e2e-txproject (1 worker), dev-wallet provisioning.parked_expired,limit_order_expired_parked, orclaim_expired_limit_orders.On-chain / contract reference for harness design
expires_at, advance block time, taker hybrid swap → wasmlimit_order_expired_parked(no CW20 to maker in taker tx — #120).smartcontracts/tests/src/limit_order_tests.rs(e.g. expired bid walk + park event); batch claim:batch_claim_expired_two_orders_one_tx.active→parked_expired→refunded(#142).Gas display precedent (not wired to claim-all confirm)
formatLimitBatchGasSavingsLine+ladder-gas-summarytest id inlimit-orders-tx.spec.ts.TerraClassicTxFeeHint,terraClassicFeeEstimate.ts.OrderBookPanel.tsx): confirm is count-only today — claim-all should at least match or exceed that bar with batch fee copy.Why this is needed
e2e-tx. Manual QA only today.Constraints / guardrails
Playwright / harness
e2e-txproject, serial mode,requireLimitTxPair,skipOrFailIfPairPaused, dev-wallet provisioning (scripts/e2e-provision-dev-wallet.sh). Do not weaken #201 strict-chain defaults.lifecycle_status; E2E global setup must have indexer + CORS aligned (seedocs/frontend.md§ Local dev indexer CORS).parked_expiredrows for dev wallet (place with shortexpires_at, advance chain time or wait, trigger hybrid swap as taker — mirror contract test pattern). Respect 5 parks/swap cap when placing many expired orders.--project=e2e-tx(shared dev account).window.confirm(or stub) for claim-all and optional chunked confirms.claim_expired_limit_orders/claim_expired_limit_orders_batchwasm action(s), same pattern as existing limit tx tests.Gas estimate in confirm
gasLimitForLimitOrderCancelBatch(chunkSize)+estimateFeeUlunaAmountForGasLimit+formatTokenAmount(6 decimals LUNC); no ad-hoc constants in UI.N × CLAIM_EXPIRED_LIMIT_ORDER_GAS_LIMIT(mirror ladderformatLimitBatchGasSavingsLinepattern); keep copy concise insidewindow.confirmor migrate to a small modal if confirm string exceeds reasonable length.Relevant files
LimitOrderMyPlacementsPanel.tsx,limitExpiredClaimBatch.ts,useLimitExpiredClaimMutation.tsterraGas.ts,transactions.ts(CLAIM_EXPIRED_LIMIT_ORDER_GAS_LIMIT),limitOrderBatchGasSummary.ts,formatAmount.tse2e/limit-orders-tx.spec.tsore2e/limit-orders-claim-all-tx.spec.ts,e2e/helpers/limit-e2e.ts(+ newlimit-expiry-park-e2e.tshelper recommended)e2e/helpers/lcd.ts, optional indexer client poll forparked_expiredskills/AGENTS_E2E_LIMIT_ORDERS_TX.md,skills/AGENTS_FRONTEND_LIMIT_PARKED_EXPIRED.md,docs/testing.md,frontend-dapp/e2e/README.mdsmartcontracts/tests/src/limit_order_tests.rsRecommended solution direction
A. Expiry-park E2E harness + claim-all test
e2e/helpers/limit-expiry-park-e2e.ts):expires_at(via UI advanced expiry or terrad script if UI path too slow).e2e/README.md).limit_order_expired_parked.GET .../limit-placementsuntil ≥ 2parked_expiredrows for dev wallet (timeout aligned with existing LCD polls).e2e-tx:/limits, assertlimits-page-claim-all-parkedvisible with (N ≥ 2).claim_expired_limit_ordersbatch action present.AGENTS_E2E_LIMIT_ORDERS_TX.md+AGENTS_FRONTEND_LIMIT_PARKED_EXPIRED.mdwith runbook and cross-link.B. Gas estimate in confirm dialog
confirmExpiredClaimBatchMessage(or sibling formatter) to append est. ~X LUNC gas usinggasLimitForLimitOrderCancelBatch(chunk.length).formatLimitBatchGasSavingsLinesemantics for claim path).docs/limit-orders.md§ #253 follow-up and agent skill.Acceptance criteria
parked_expiredrows for dev wallet on an unpaused pair.e2e-txtest: Claim all parked → one batch tx → LCD shows batch claim wasm action.gasLimitForLimitOrderCancelBatch/estimateFeeUlunaAmountForGasLimitonly.e2e/README.mddocument harness prerequisites and run command.Test plan — functional paths
parked_expired× 2.claim_expired_limit_orders(batch attrs).gas_usedon LocalTerra (within buffer tolerance)./tradecompact panel: smoke that gas copy path shared with/limits(if confirm helper is shared).Test plan — attack / abuse vectors
Fee.amountsent at broadcast (sameeffectiveGasPriceUlunafloor as #127).parked_expired, test fails loudly (no flaky pass).Verification criteria
npm test— Vitest forlimitExpiredClaimBatch,LimitOrderMyPlacementsPanel(updated confirm copy).bash scripts/with-node.sh --cwd frontend-dapp -- npx playwright test <new-spec> --project=e2e-txpasses with LocalTerra + indexer + deploy + dev-wallet provision.e2e-txjob green (or documented new job step if spec split).Related
marked as related to #253
mentioned in commit
2e6f2cfe29mentioned in commit
473e0d3a3aImplementation complete (merged to
main—473e0d3)Closed the two gaps from #253 follow-up:
A. Confirm-dialog gas estimate
confirmExpiredClaimBatchMessage/ newformatExpiredClaimBatchGasLineinfrontend-dapp/src/utils/limitExpiredClaimBatch.ts.gasLimitForLimitOrderCancelBatch(chunkSize)+estimateFeeUlunaAmountForGasLimitonly (same math as broadcast); optional savings vs N× singleCLAIM_EXPIRED_LIMIT_ORDER_GAS_LIMIT.limitExpiredClaimBatch.test.ts.B. Playwright
e2e-txclaim-all pathscripts/e2e-seed-expired-parked-claim-all.sh— place 2 expired bids → wait for chain time → hybrid swap parks (limit_order_expired_parked).frontend-dapp/e2e/helpers/limit-expiry-park-e2e.ts(seed wrapper + indexer poll forparked_expired).frontend-dapp/e2e/limit-orders-claim-all-tx.spec.ts—/limitsClaim all parked → confirm (must include LUNC gas) → LCDclaim_expired_limit_orders_batch.Docs / agent skills
docs/limit-orders.md§ #253 invariants (confirm gas #259)docs/testing.md,frontend-dapp/e2e/README.mdskills/AGENTS_E2E_LIMIT_ORDERS_TX.md,skills/AGENTS_FRONTEND_LIMIT_PARKED_EXPIRED.mdVerification checklist
npm test -- --run src/utils/__tests__/limitExpiredClaimBatch.test.ts— confirm strings for N=2, N=5, chunked N=31docker compose up -d localterra+make build-optimized+bash scripts/deploy-dex-local.sh(pair wasm must includeclaim_expired_limit_orders— #246)docs/frontend.md§ Local dev indexer CORS)bash scripts/e2e-seed-expired-parked-claim-all.sh→ indexer shows ≥2parked_expiredfor dev walletbash scripts/with-node.sh --cwd frontend-dapp -- npx playwright test e2e/limit-orders-claim-all-tx.spec.ts --project=e2e-tx— green end-to-endgas_usedon LocalTerra (within buffer tolerance)QA agent team
Please run the checklist above on a fresh LocalTerra deploy (stale pair code without batch claim will revert with
unknown variant claim_expired_limit_orders). Confirm:parked_expiredrows)e2e-txspec in CI/local strict chain/limitsand/tradecompact panel (shared helper)Issue left open until QA sign-off.
Follow-up (environment): If
deploy-dex-local.shhits account sequence mismatch under bot swarm, retry after load settles or pause bots — same as othere2e-txspecs (#201).mentioned in issue #253
mentioned in merge request !736
#259 verified — good to close. Checklist against
473e0d3:Acceptance criteria
Verification criteria
The Playwright e2e-tx run on a clean strict-chain host is CI/agent territory; the spec ships in the repo and I confirmed harness reproducibility + walked the full claim-all path. Verified end to end. @PlasticDigits
mentioned in merge request !821
mentioned in merge request !831
mentioned in issue #292
mentioned in merge request !836
mentioned in issue #339
mentioned in issue #337