feat(community-tax): migrate pair inventory — CL8Y vs Terraport/GDEX next steps + tools #634
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#634
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?
Parent / related
Migrate-adopt #626 (M626-9, M626-10). Autoregister + Manage catch-up + manager tax skip #633 (new CL8Y
CreatePair/ Manage highest-LP). F6 pin + Refresh #582 / #584 / #585. Template #592. Create/Manage #593. Ops after adopt:docs/runbooks/cw20-code-id-ops.md. Terraport factory table:docs/terraport.md.This ticket is migrate-only. Do not fold it into #633. #633 covers new CL8Y pair create + Manage “no registered pair yet.” Adopt keeps the CW20 address, so the token may already have CL8Y factory pairs (F6-frozen until governance Refresh) and Terraport / GDEX pairs (not F6-pinned; must never be
RegisterListedPair’d). The migrate UI must inventory those venues, say what happens, offer a tool when the connected wallet can act, and give copy-paste instructions when it cannot.Current codebase
MigrateTokenPage.tsxloads a pasted addr, classifies source code id / admin, and shows one generic line before submit:No pair discovery. No per-pool list. No F6 / pause / Refresh status. No register CTA. Success is only
Token migrated.+ link to/token/:addr/manage(M626-12). Query params?token=/?addr=are ignored.Adopt (
[adopt.rs](smartcontracts/contracts/community-tax-token/src/adopt.rs)) does not callRegisterListedPair. Honest payload is tax-off zeros; ALPHA wipe maps 4.5%/1% → buy 450 / sell 100 but those rates do nothing until a CL8Y pair is registered. Terraport/GDEX keep the same CW20 address and stay 1:1 if left unregistered (M626-10).Known columbus-5 external LP (LCD 2026-08-24, skill table — not queried by the page):
terra1x6e64…zysuxzterra12u7kh…9e7p6terra1jg2vu…wphterra1qz56v…s74n3terra1uxr6m…nypycCL8Y factory pairs that already include the token fail-close after adopt (live
code_id11619 ≠ pin of 6036/10184/8266/8654) until governanceRefreshPairAssetCodeIds. Token admin / new manager cannot Refresh. Ops order: 11619 already listed →SetPairPaused→ Refresh (do not Refresh if the other asset is unlisted) → smoke → unpause. Then #633 register so retail buy/sell apply.Indexer
GET /api/v1/tokens/{addr}/pairsis CL8Y-ingested only. Terraport factory is documented (terra1n75fg…rqqrindocs/terraport.md). GDEX factory is not pinned.Why this is needed
A manager who migrates ALPHA or Open (or any 6036/10184 token that already has a CL8Y pool) is not starting from zero pairs. The current one-liner does not tell them:
Without that, they will either LP into a frozen CL8Y pair, try to
RegisterListedPaira Terraport addr (revert or, if a bug slipped, turn tax on an external AMM — H-01), or assume “Terraport keeps this token” means they should also list it for extra-debit.#633’s Manage alert is “no registered CL8Y pair yet” for tokens the wallet already manages. It does not run on
/token/migrate, does not explain F6/Refresh, and must not offer Terraport addrs as “highest LP.”Constraints / guardrails
RegisterListedPairTerraport, GDEX, or any non-config.factorypair. Button/tool must factory-verify first.RefreshPairAssetCodeIds/SetPairPausedon this page. Do not Refresh a pair whose other asset is unlisted. Human words only on the card — notax_info/RegisterListedPair/VITE_*/GetAssetCodeIds.?payee=/?manager=/?pair=.code_idis the tax pin.Relevant files
frontend-dapp/src/pages/MigrateTokenPage.tsx,MigrateTokenPage.test.tsxfrontend-dapp/src/utils/communityTaxMigrate.tssmartcontracts/contracts/community-tax-token/src/adopt.rsfrontend-dapp/src/services/terraclassic/communityTaxToken.ts(registerListedPair,queryCommunityTaxIsExempt)frontend-dapp/src/services/indexer/client.tsgetTokenPairs;services/terraclassic/factory.ts;services/terraclassic/pair.tsgetPoolfrontend-dapp/src/services/terraclassic/assetCodeIdFreeze.ts,hooks/usePairCodeIdFreeze.tsdocs/terraport.md(terra1n75fg…rqqr)skills/AGENTS_FRONTEND_TOKEN_MIGRATE.mddocs/runbooks/cw20-code-id-ops.md§ After a retail adoptskills/AGENTS_FRONTEND_TOKEN_MIGRATE.md(M626-9, M626-10)Recommended direction
1 — Discover venues when the token is loaded (before and after submit)
Build a small helper (e.g.
communityTaxMigratePairs.ts) that returns rows{ venue, pair, symbols, note }:getTokenPairs+ factoryPairverify (officialVITE_FACTORY_ADDRESS/ launcherfactory). LCDPoolfor size. F6GetAssetCodeIdsvs livecode_idwhen already on 11619 (post-tx).Pairfor this token vs uluna / uusd / other known quotes; overlay the static ALPHA/Open table so those two always show when the loaded addr matches.Show the list on the confirm card and on the success card (refetch after migrate).
2 — Per-venue next steps (copy + tool vs instructions)
CL8Y pair exists (pre- or post-adopt):
registerListedPair). Same factory verify. Hide when alreadyIsProtocolExempt.protocol./create(no query prefill) plus one line that new CL8Y pools are registered on create (#633).Terraport / GDEX:
3 — Success card checklist (ordered)
Keep a single lead sentence on the page (#489). Details live in the inventory card, not a contract essay.
4 — Docs
Extend
AGENTS_FRONTEND_TOKEN_MIGRATE.mdwith this inventory UX (new M626- bullets or a sibling M634 set). Point #633 at this issue for adopt leftovers instead of stretching Manage-only copy.Acceptance criteria
RefreshPairAssetCodeIds,SetPairPaused, orAddWhitelistedCodeId./create, no prefill). Not an error.?token=/?addr=/?pair=/?payee=do not prefill or retarget register.Test plan — happy / functional paths
already/ protocol true).Pairprobe still finds a CL8Y pair; empty indexer ≠ “no CL8Y pool” if factory has one.already_tax; inventory may still show venues as read-only help; no adopt tx.Test plan — attack / abuse / hack vectors
Pairmust not get a register button.refresh_pair_asset_code_ids/set_pair_paused/add_whitelisted_code_idmessages (static grep in tests).?pair=terra1terraport…must not become the register target.Verification criteria
Close only when:
terra1qz56v…→ Terraport Open/LUNC shown, no register; load ALPHAterra1x6e64…→ both Terraport rows, wipe copy, no register.refresh_pair_asset_code_idsor callregisterListedPairwith a non-factory addr.Do not close if the page still only has the generic
MIGRATE_LP_CONFIRMline, or if the only “tool” is a raw pair paste that can target Terraport.Out of scope
RefreshPairAssetCodeIdsor factory pause.mentioned in issue #633
mentioned in issue #635
marked as related to #635
mentioned in merge request !1138
Implemented in !1138.
make verify-issue-634is green (Vitest + docs, twice). Remaining close gates: columbus-5 Open/ALPHA LCD walkthrough and LocalTerra adopt+Refresh+register of an existing CL8Y pair.mentioned in commit
96b318d9f6mentioned in issue #636
marked as related to #636
!1138 merge note (no CI wait)
Merged !1138 into
mainas96b318d9(sourcef4408a3a). GitLab reported no conflicts (can_be_merged); localgit merge-treeagainst currentmainalso produced a clean tree (MR was 0 behind, 1 ahead). Merged with--auto-merge=false(did not wait for CI). Source branch removed on origin.Sanity / AC
make verify-issue-634on the source branch: 4/4 PASS (Vitest 25 tests: helper + inventory card + migrate page; docs M634 + no Refresh execute; twice).registerMigrateCl8yPairfactory-verifies again.terra1qz56v…/terra1uxr6m…nypyc) — full Open pair bech32 not pinned. Live LCD walkthrough not run./create(no prefill).?token=/?addr=/?pair=/?payee=voided; Vitest confirms no prefill / no register retarget.GitLab CI on !1138 failed with
ci_quota_exceeded(frontend-build / frontend / gitleaks) — same quota class as !1136 / !1137, not a code defect.Problems / leftovers (do not reopen this issue)
Tracked on #636:
Adopt wasm / Coolify pin leftovers stay on #628. Autoregister leftovers stay on #635.
mentioned in commit
67a8bdb16cLocalTerra verify (not columbus-5)
Pushed to
mainas67a8bdb1(scripts/qa/localterra-634-migrate-inventory.sh+VERIFY634_REQUIRE_CHAIN=1 make verify-issue-634). Do not reopen this issue — columbus-5 Open/ALPHA leftovers stay on #636.Ran
VERIFY634_REQUIRE_CHAIN=1 make verify-issue-634→ 5/5 PASS (Vitest + M634 docs grep + LocalTerra live).RegisterListedPair.RefreshPairAssetCodeIds(not the retail page) then register listed only that factory pair.cw20-mintablewrites cw2crates.io:cw20-base(10184 analogue), notcw20-mintable. Assertion + playbook updated.Checklist (issue body + comments)
make verify-issue-634)make verify-issue-626not re-run in this sessionterra1qz56v…LCD walkthroughterra1x6e64…LCD walkthroughClose decision
Leave closed. LocalTerra M634 leftover from the !1138 merge note is now proven. Columbus-5 inventory walkthroughs remain on #636. No M634 invariant was wrong.
How to re-run:
make setup-cloud-localterra(ormake deploy-localon a healthy chain), thenVERIFY634_REQUIRE_CHAIN=1 make verify-issue-634.Columbus-5 leftover verify #636 is closed (Open/ALPHA live inventory + full Open Terraport bech32). Do not reopen this issue unless an M634 invariant is wrong.
mentioned in issue #603
mentioned in issue #614
mentioned in issue #628
mentioned in issue #670
marked as related to #670
mentioned in merge request !1168
mentioned in issue #690