feat(create-token): identity validation, percent taxes, and SKU init (#604 #605) #1122

Merged
PlasticDigits merged 2 commits from issue/604-605-create-token-identity-sku into main 2026-08-23 12:32:52 +00:00
PlasticDigits commented 2026-08-23 11:52:14 +00:00 (Migrated from gitlab.com)

Summary

  • #604 — Shared identity validators (decimals 6–18, ^[A-Za-z0-9]+$ name 3–50 / symbol 3–12) on the dApp and in community-tax-token::instantiate before cw20_base. Launcher fail-fast. Connected wallet autofills empty treasury/manager with exact helper copy connected wallet / not connected wallet; connecting never clobbers a typed address.
  • #605 — Retail tax fields are percent (2 dp → bps). SKU checkboxes reveal init payloads (transfer_bps, sinks, initial_exempt, explicit max %, launch guards with required trading_enabled default off, human mint cap).
  • #605 audit note H-1 — AutoLP SKU instantiates+binds the sister when autolp_code_id is set (BindAutolp). Unset refuses the SKU so 50 UST1 is not kept for a discarded init. Inverts poc_autov2lp_paid_but_never_bound once audit_poc is on this branch.
  • #605 audit note M-1 — Kept the paid “Change rates later” SKU and implemented a real gate (C605-4): without variable_rates, instantiate max_* must equal the current rate (no CLI headroom); settings buy_bps / sell_bps require the SKU. Removed the require_variable_or_free_profile no-op. Manage buy/sell stay locked until unlock. Inverts poc_variable_rates_sku_is_theater.
  • Invariants C604-1–C604-3 and C605-1–C605-4 documented and crosslinked in docs/frontend.md, docs/contracts-terraclassic.md, skills/AGENTS_FRONTEND_CREATE_TOKEN.md, skills/AGENTS_COMMUNITY_TAX_CW20.md, AGENTS.md, docs/testing.md.

Closes #604
Closes #605

Notes checked

  • #604 has no extra functional note beyond the sibling pointer to #605. #608 mentions #604 only to say identity is unrelated (H-3/H-4 stay on #608).
  • #605 2026-08-23 audit note (INTERNAL_KIMIK3_1787468843): H-1 and M-1 folded here. AutoLP pair/skim hardening stays #610. EnableFeature/SKU dedupe stays #606. Launch-guard cooldown/max_wallet stays #608. Exemption skip-tax stays #609.

Out of scope (documented, not this MR)

  • Columbus-5 store / launcher token_code_id rotate / #589 GO / AddWhitelistedCodeId. Live 11611 keeps current instantiate rules until that ops rotate (C604-3). Frontend ships as the client gate first.
  • No /token/migrate importer (#603).
  • No factory whitelist of ALPHA 8654, launcher, or AutoLP (O601-2).
  • No LocalTerra store of the new wasm / browser E2E / live LCD Manage settings-batch round-trip.
  • AutoLP factory-listed pair + skim floor (#610). Duplicate SKU / EnableFeature path (#606). Launch-guard pair-wide cooldown / provide brick (#608).

Test plan

  • make verify-issue-604 (first pass + retest)
  • make verify-issue-605 (first pass + retest, includes M-1 crate tests)
  • make verify-issue-593 stays green
  • Token + launcher crate tests: identity bounds, launch-guards required, SKU-payload-without-feature, AutoLP bind / AutolpCodeNotSet, headroom without VariableRates rejected, settings buy/sell require SKU
  • Vitest: identity parsers, percent↔bps, SKU presence/absence, sinks, connected-wallet helpers, Manage percent placeholders, Manage buy/sell locked without VariableRates
  • Reviewer: LocalTerra store of new token wasm + instantiate reject decimals: 0 / name "x y" / max_sell_bps > sell_bps without variable_rates
  • Reviewer: /token/create connect → treasury/manager show connected address + helper; paste other bech32 → not connected wallet
  • Reviewer: Auto liquidity SKU with unset autolp_code_id is blocked; with code id set, create binds GetConfig.autolp
  • Reviewer: Manage buy/sell disabled until Change rates later is unlocked; settings batch without the SKU reverts and keeps the 50 UST1
  • Ops follow-up (separate): new token code_id → launcher UpdateConfig { token_code_id } → #589 REPORT GO → factory AddWhitelistedCodeId (keep 11611 listed)
## Summary - **#604** — Shared identity validators (decimals 6–18, `^[A-Za-z0-9]+$` name 3–50 / symbol 3–12) on the dApp and in `community-tax-token::instantiate` before `cw20_base`. Launcher fail-fast. Connected wallet autofills empty treasury/manager with exact helper copy `connected wallet` / `not connected wallet`; connecting never clobbers a typed address. - **#605** — Retail tax fields are percent (2 dp → bps). SKU checkboxes reveal init payloads (`transfer_bps`, sinks, `initial_exempt`, explicit max %, launch guards with required `trading_enabled` default off, human mint cap). - **#605 audit note H-1** — AutoLP SKU instantiates+binds the sister when `autolp_code_id` is set (`BindAutolp`). Unset refuses the SKU so 50 UST1 is not kept for a discarded init. Inverts `poc_autov2lp_paid_but_never_bound` once `audit_poc` is on this branch. - **#605 audit note M-1** — Kept the paid “Change rates later” SKU and implemented a real gate (**C605-4**): without `variable_rates`, instantiate `max_*` must equal the current rate (no CLI headroom); settings `buy_bps` / `sell_bps` require the SKU. Removed the `require_variable_or_free_profile` no-op. Manage buy/sell stay locked until unlock. Inverts `poc_variable_rates_sku_is_theater`. - Invariants **C604-1–C604-3** and **C605-1–C605-4** documented and crosslinked in `docs/frontend.md`, `docs/contracts-terraclassic.md`, `skills/AGENTS_FRONTEND_CREATE_TOKEN.md`, `skills/AGENTS_COMMUNITY_TAX_CW20.md`, `AGENTS.md`, `docs/testing.md`. Closes #604 Closes #605 ## Notes checked - **#604** has no extra functional note beyond the sibling pointer to #605. `#608` mentions #604 only to say identity is unrelated (H-3/H-4 stay on #608). - **#605** 2026-08-23 audit note (`INTERNAL_KIMIK3_1787468843`): H-1 and M-1 folded here. AutoLP pair/skim hardening stays #610. EnableFeature/SKU dedupe stays #606. Launch-guard cooldown/max_wallet stays #608. Exemption skip-tax stays #609. ## Out of scope (documented, not this MR) - Columbus-5 store / launcher `token_code_id` rotate / #589 GO / `AddWhitelistedCodeId`. Live **11611** keeps current instantiate rules until that ops rotate (**C604-3**). Frontend ships as the client gate first. - No `/token/migrate` importer (#603). - No factory whitelist of ALPHA **8654**, launcher, or AutoLP (**O601-2**). - No LocalTerra store of the new wasm / browser E2E / live LCD Manage settings-batch round-trip. - AutoLP factory-listed pair + skim floor (**#610**). Duplicate SKU / EnableFeature path (**#606**). Launch-guard pair-wide cooldown / provide brick (**#608**). ## Test plan - [x] `make verify-issue-604` (first pass + retest) - [x] `make verify-issue-605` (first pass + retest, includes M-1 crate tests) - [x] `make verify-issue-593` stays green - [x] Token + launcher crate tests: identity bounds, launch-guards required, SKU-payload-without-feature, AutoLP bind / `AutolpCodeNotSet`, headroom without VariableRates rejected, settings buy/sell require SKU - [x] Vitest: identity parsers, percent↔bps, SKU presence/absence, sinks, connected-wallet helpers, Manage percent placeholders, Manage buy/sell locked without VariableRates - [ ] Reviewer: LocalTerra store of new token wasm + instantiate reject `decimals: 0` / name `"x y"` / `max_sell_bps > sell_bps` without `variable_rates` - [ ] Reviewer: `/token/create` connect → treasury/manager show connected address + helper; paste other bech32 → `not connected wallet` - [ ] Reviewer: Auto liquidity SKU with unset `autolp_code_id` is blocked; with code id set, create binds `GetConfig.autolp` - [ ] Reviewer: Manage buy/sell disabled until Change rates later is unlocked; settings batch without the SKU reverts and keeps the 50 UST1 - [ ] Ops follow-up (separate): new token code_id → launcher `UpdateConfig { token_code_id }` → #589 REPORT GO → factory `AddWhitelistedCodeId` (keep 11611 listed)
PlasticDigits commented 2026-08-23 11:52:34 +00:00 (Migrated from gitlab.com)

marked this merge request as ready

marked this merge request as **ready**
PlasticDigits commented 2026-08-23 11:52:35 +00:00 (Migrated from gitlab.com)

mentioned in issue #604

mentioned in issue #604
PlasticDigits commented 2026-08-23 11:52:37 +00:00 (Migrated from gitlab.com)

mentioned in issue #605

mentioned in issue #605
PlasticDigits commented 2026-08-23 12:20:38 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits commented 2026-08-23 12:20:39 +00:00 (Migrated from gitlab.com)

added 1 commit

  • 75a0536d - fix: gate VariableRates so change-rates SKU is not theater (#605 M-1)

Compare with previous version

added 1 commit <ul><li>75a0536d - fix: gate VariableRates so change-rates SKU is not theater (#605 M-1)</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/404/diffs?diff_id=1978180432&start_sha=fe47dd8c60132caf0241258a1bb67e9845eb8833)
PlasticDigits commented 2026-08-23 12:32:53 +00:00 (Migrated from gitlab.com)

mentioned in commit 715d9555bd

mentioned in commit 715d9555bd01f1007f37a459bd255e0c9916afbb
PlasticDigits (Migrated from gitlab.com) merged commit 715d9555bd into main 2026-08-23 12:32:53 +00:00
PlasticDigits commented 2026-08-23 12:34:08 +00:00 (Migrated from gitlab.com)

mentioned in commit 33e4153f87

mentioned in commit 33e4153f87ef075614781734950f0cfa211695c2
PlasticDigits commented 2026-08-23 12:35:52 +00:00 (Migrated from gitlab.com)

mentioned in commit 784ac9e1cd

mentioned in commit 784ac9e1cd4e97419b74e3c3e041a78a5b097318
PlasticDigits commented 2026-08-23 12:35:52 +00:00 (Migrated from gitlab.com)

mentioned in commit 709a2694d5

mentioned in commit 709a2694d562d32dd2d6cff7dbfc8c3b307010dc
PlasticDigits commented 2026-08-23 12:41:00 +00:00 (Migrated from gitlab.com)

mentioned in issue #611

mentioned in issue #611
PlasticDigits commented 2026-08-23 12:41:13 +00:00 (Migrated from gitlab.com)

mentioned in issue #608

mentioned in issue #608
PlasticDigits commented 2026-08-23 12:41:15 +00:00 (Migrated from gitlab.com)

mentioned in issue #609

mentioned in issue #609
PlasticDigits commented 2026-08-24 11:45:21 +00:00 (Migrated from gitlab.com)

mentioned in issue #603

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