fix(#518): sanitize LP ticker so UST1/CL8Y create_pair succeeds #1052

Merged
PlasticDigits merged 2 commits from fix/518-lp-symbol-digits into main 2026-08-15 09:51:42 +00:00
PlasticDigits commented 2026-08-15 09:39:23 +00:00 (Migrated from gitlab.com)

Closes #518

Summary

  • LP tickers keep digits 0-9 and strip only non-alphanumeric prefix chars (UST1-CUST-LP, CL8Y-CLUN-LP, FOO_BAR → FOOB).
  • Classic columbus-5 LP CW20 ([a-zA-Z\-]{3,12}) still rejects those tickers — this requires a contract upgrade.
  • Factory 1.6.0 UpdateConfig now accepts pair_code_id / lp_token_code_id so new create_pair uses upgraded pair wasm + digit-allowing cw20-mintable.
  • Operator path: scripts/upgrade-518-lp-symbol.sh (store factory+pair, migrate factory, UpdateConfig). Reuse on-chain mintable with UPGRADE518_LP_CODE_ID=10184.
  • Existing pairs keep their LP tokens (instantiate-time only).

Test plan

  • make verify-issue-518 (unit + classic-revert/unblock integration + upgrade DRY_RUN; suite run twice)
  • Classic LP still reverts UST1/CL8Y; UpdateConfig.lp_token_code_id → mintable unblocks UST1-CUST-LP
  • Letter-only pairs still work on classic LP
  • pre-commit clippy + fmt
  • After merge: make build-optimized then ./scripts/upgrade-518-lp-symbol.sh (or DRY_RUN=1 first)
  • Re-simulate create_pair for UST1/cUSTC and any CL8Y pair
Closes #518 ## Summary - LP tickers **keep digits `0-9`** and strip only **non-alphanumeric** prefix chars (`UST1-CUST-LP`, `CL8Y-CLUN-LP`, `FOO_BAR` → `FOOB`). - Classic columbus-5 LP CW20 (`[a-zA-Z\-]{3,12}`) still rejects those tickers — this **requires a contract upgrade**. - Factory **1.6.0** `UpdateConfig` now accepts `pair_code_id` / `lp_token_code_id` so new `create_pair` uses upgraded pair wasm + digit-allowing `cw20-mintable`. - Operator path: [`scripts/upgrade-518-lp-symbol.sh`](../scripts/upgrade-518-lp-symbol.sh) (store factory+pair, migrate factory, UpdateConfig). Reuse on-chain mintable with `UPGRADE518_LP_CODE_ID=10184`. - Existing pairs keep their LP tokens (instantiate-time only). ## Test plan - [x] `make verify-issue-518` (unit + classic-revert/unblock integration + upgrade DRY_RUN; suite run twice) - [x] Classic LP still reverts UST1/CL8Y; `UpdateConfig.lp_token_code_id` → mintable unblocks `UST1-CUST-LP` - [x] Letter-only pairs still work on classic LP - [x] pre-commit clippy + fmt - [ ] After merge: `make build-optimized` then `./scripts/upgrade-518-lp-symbol.sh` (or `DRY_RUN=1` first) - [ ] Re-simulate `create_pair` for UST1/cUSTC and any CL8Y pair
PlasticDigits commented 2026-08-15 09:43:33 +00:00 (Migrated from gitlab.com)

mentioned in issue #518

mentioned in issue #518
PlasticDigits commented 2026-08-15 09:46:38 +00:00 (Migrated from gitlab.com)

added 1 commit

  • b53ebd60 - fix(#518): keep digits in LP tickers and add factory code-id upgrade

Compare with previous version

added 1 commit <ul><li>b53ebd60 - fix(#518): keep digits in LP tickers and add factory code-id upgrade</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/334/diffs?diff_id=1963766421&start_sha=3259ae01ddf51224e836bb50f92e1df8aced0f97)
PlasticDigits commented 2026-08-15 09:46:39 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits commented 2026-08-15 09:51:42 +00:00 (Migrated from gitlab.com)

mentioned in commit e0b6033ae6

mentioned in commit e0b6033ae6d34b43886c7c977532037377383178
PlasticDigits (Migrated from gitlab.com) merged commit e0b6033ae6 into main 2026-08-15 09:51:42 +00:00
PlasticDigits commented 2026-08-15 09:52:27 +00:00 (Migrated from gitlab.com)

mentioned in commit 8bb0e6ab9b

mentioned in commit 8bb0e6ab9b8bb65303e2c9aae31ac1cd3896ab57
PlasticDigits commented 2026-08-15 09:52:30 +00:00 (Migrated from gitlab.com)

mentioned in issue #519

mentioned in issue #519
PlasticDigits commented 2026-08-15 09:57:13 +00:00 (Migrated from gitlab.com)

mentioned in issue #521

mentioned in issue #521
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!1052
No description provided.