Deploy: Router contract rejects set_wrap_mapper — variant not implemented #28

Closed
opened 2026-03-18 04:44:25 +00:00 by Brouie · 5 comments
Brouie commented 2026-03-18 04:44:25 +00:00 (Migrated from gitlab.com)

Environment: LocalTerra, fresh deploy via deploy-dex-local.sh\n\nSteps to Reproduce:\n1. Run bash scripts/deploy-dex-local.sh\n2. Observe Phase 1b step [9b.9]\n\nExpected: Router accepts set_wrap_mapper and registers the wrap-mapper address.\n\nGot:\n\nError parsing into type cl8y_dex_router::msg::ExecuteMsg: unknown variant `set_wrap_mapper`, expected `receive` or `execute_swap_operations`\n\n\nImpact: Router cannot perform native denom swaps (uluna/uusd) via wrap→swap→unwrap path. Wrap/unwrap works standalone via Treasury + Wrap-Mapper, but router integration is blocked.\n\nDeploy script reference: scripts/deploy-dex-local.sh step [9b.9]

**Environment:** LocalTerra, fresh deploy via deploy-dex-local.sh\n\n**Steps to Reproduce:**\n1. Run bash scripts/deploy-dex-local.sh\n2. Observe Phase 1b step [9b.9]\n\n**Expected:** Router accepts set_wrap_mapper and registers the wrap-mapper address.\n\n**Got:**\n```\nError parsing into type cl8y_dex_router::msg::ExecuteMsg: unknown variant `set_wrap_mapper`, expected `receive` or `execute_swap_operations`\n```\n\n**Impact:** Router cannot perform native denom swaps (uluna/uusd) via wrap→swap→unwrap path. Wrap/unwrap works standalone via Treasury + Wrap-Mapper, but router integration is blocked.\n\n**Deploy script reference:** scripts/deploy-dex-local.sh step [9b.9]
Brouie commented 2026-03-18 05:27:56 +00:00 (Migrated from gitlab.com)

mentioned in issue #35

mentioned in issue #35
PlasticDigits commented 2026-03-18 05:35:00 +00:00 (Migrated from gitlab.com)

mentioned in commit e7283280b7

mentioned in commit e7283280b7fad567cb944a0ba161e6f4f4c01b0a
PlasticDigits commented 2026-03-18 05:35:12 +00:00 (Migrated from gitlab.com)

Fixed in e728328 — three changes:

  1. Deploy script staleness guard — deploy-dex-local.sh now checks every cl8y_dex_*.wasm artifact against its source .rs files at startup. If any artifact is older than its source, the script exits immediately with a clear error listing the stale contracts and telling you to run make build-optimized.

  2. Makefile dependency — deploy-local now depends on build-optimized, so make deploy-local always rebuilds contracts first. This was the actual root cause: the WASM artifacts were built on Mar 11 but the SetWrapMapper variant was added on Mar 17. All 4 deployed contracts (factory, pair, router, fee-discount) were stale — not just the router.

  3. QA onboarding doc updated — the "What the deploy script does" section now reflects the current 16-step flow including treasury, wrap-mapper, native token wrapping, non-whitelisted tokens, and unpaired tokens.

@Brouie — please pull latest main, run make reset && make dev-full (or make start && make deploy-local), and verify step [9b.9] passes without the unknown variant error. The build-optimized step will now run automatically before deploy.

Fixed in e728328 — three changes: 1. **Deploy script staleness guard** — `deploy-dex-local.sh` now checks every `cl8y_dex_*.wasm` artifact against its source `.rs` files at startup. If any artifact is older than its source, the script exits immediately with a clear error listing the stale contracts and telling you to run `make build-optimized`. 2. **Makefile dependency** — `deploy-local` now depends on `build-optimized`, so `make deploy-local` always rebuilds contracts first. This was the actual root cause: the WASM artifacts were built on Mar 11 but the `SetWrapMapper` variant was added on Mar 17. All 4 deployed contracts (factory, pair, router, fee-discount) were stale — not just the router. 3. **QA onboarding doc updated** — the "What the deploy script does" section now reflects the current 16-step flow including treasury, wrap-mapper, native token wrapping, non-whitelisted tokens, and unpaired tokens. @Brouie — please pull latest `main`, run `make reset && make dev-full` (or `make start && make deploy-local`), and verify step [9b.9] passes without the `unknown variant` error. The build-optimized step will now run automatically before deploy.
Brouie commented 2026-03-18 06:42:05 +00:00 (Migrated from gitlab.com)

Verified on fresh deploy (86f148d). Router config now shows wrap_mapper registered. set_wrap_mapper tx succeeded. Native swap via router still needs LUNC-C/USTC-C pairs created — tracked in #35.

Verified on fresh deploy (86f148d). Router config now shows wrap_mapper registered. set_wrap_mapper tx succeeded. Native swap via router still needs LUNC-C/USTC-C pairs created — tracked in #35.
Brouie (Migrated from gitlab.com) closed this issue 2026-03-18 06:43:23 +00:00
Brouie commented 2026-03-18 06:55:30 +00:00 (Migrated from gitlab.com)

mentioned in issue #26

mentioned in issue #26
Sign in to join this conversation.
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#28
No description provided.