chore(treasury): remove obsolete SwapDeposit / swap_contract (#8) #30

Merged
PlasticDigits merged 1 commit from chore/remove-swap-deposit-8 into master 2026-08-05 01:51:30 +00:00
PlasticDigits commented 2026-08-05 01:45:26 +00:00 (Migrated from gitlab.com)

Summary

  • Removes dead treasury SwapDeposit / SetSwapContract / Config.swap_contract and the treasury-local SwapExecuteMsg::NotifyDeposit path (audit MB-1 / #8).
  • migrate rewrites legacy config (drops swap_contract, defaults missing wrapping_paused) so the #5 treasury wasm bump cannot re-arm the footgun.
  • Docs + skills/treasury-swap-removal document the live path: user → ustc-swap Swap → BankMsg::Send USTC to treasury; wrap NotifyDeposit unchanged.

Closes #8

Acceptance criteria (#8)

  • SwapDeposit / SetSwapContract / swap_contract removed from treasury ExecuteMsg, Config, state, and handlers
  • Local SwapExecuteMsg / NotifyDeposit-to-swap path removed
  • Treasury migrate from pre-removal config succeeds; wrap + CW20 InstantWithdraw surfaces unaffected (unit coverage)
  • Unit tests updated; no tests require successful NotifyDeposit to ustc-swap
  • Docs updated (ARCHITECTURE.md, CONTRACTS.md, DEPLOYMENT.md, plans, skills)
  • Bundled into the #5 treasury wasm + mainnet migrate (same code_id bump) — code ready; mainnet store/migrate is ops follow-up with #5
  • Post-migrate: removed msgs fail as unknown variant; wrap path still works (unit)

Test plan

  • cargo test --package treasury --lib (140 passed)
  • cargo test --package wrap-mapper --lib (100 passed)
  • Migrate strips swap_contract (Some/None) + preserves wrapping_paused
  • test_existing_features_after_migrate uses WrapDeposit (not SwapDeposit)
  • Regression: WrapDeposit + InstantWithdrawCw20 still pass
  • Include in #5 LocalTerra / mainnet migrate rehearsal checklist (ops)

Not in this MR

  • Mainnet store/migrate + smoke (owned by #5 bundle)
  • No ustc-swap product ABI changes (by design)
  • Wrap-mapper NotifyDeposit / treasury WrapDeposit kept
## Summary - Removes dead treasury `SwapDeposit` / `SetSwapContract` / `Config.swap_contract` and the treasury-local `SwapExecuteMsg::NotifyDeposit` path (audit MB-1 / #8). - `migrate` rewrites legacy config (drops `swap_contract`, defaults missing `wrapping_paused`) so the #5 treasury wasm bump cannot re-arm the footgun. - Docs + `skills/treasury-swap-removal` document the live path: user → ustc-swap `Swap` → `BankMsg::Send` USTC to treasury; wrap `NotifyDeposit` unchanged. Closes #8 ## Acceptance criteria (#8) - [x] `SwapDeposit` / `SetSwapContract` / `swap_contract` removed from treasury ExecuteMsg, Config, state, and handlers - [x] Local `SwapExecuteMsg` / NotifyDeposit-to-swap path removed - [x] Treasury migrate from pre-removal config succeeds; wrap + CW20 InstantWithdraw surfaces unaffected (unit coverage) - [x] Unit tests updated; no tests require successful `NotifyDeposit` to ustc-swap - [x] Docs updated (`ARCHITECTURE.md`, `CONTRACTS.md`, `DEPLOYMENT.md`, plans, skills) - [ ] Bundled into the #5 treasury wasm + mainnet migrate (same code_id bump) — **code ready; mainnet store/migrate is ops follow-up with #5** - [x] Post-migrate: removed msgs fail as unknown variant; wrap path still works (unit) ## Test plan - [x] `cargo test --package treasury --lib` (140 passed) - [x] `cargo test --package wrap-mapper --lib` (100 passed) - [x] Migrate strips `swap_contract` (Some/None) + preserves `wrapping_paused` - [x] `test_existing_features_after_migrate` uses WrapDeposit (not SwapDeposit) - [x] Regression: WrapDeposit + InstantWithdrawCw20 still pass - [ ] Include in #5 LocalTerra / mainnet migrate rehearsal checklist (ops) ## Not in this MR - Mainnet store/migrate + smoke (owned by #5 bundle) - No ustc-swap product ABI changes (by design) - Wrap-mapper `NotifyDeposit` / treasury `WrapDeposit` kept
PlasticDigits commented 2026-08-05 01:45:40 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits commented 2026-08-05 01:46:01 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits (Migrated from gitlab.com) merged commit 5ecee9d082 into master 2026-08-05 01:51:30 +00:00
PlasticDigits commented 2026-08-05 01:51:31 +00:00 (Migrated from gitlab.com)

mentioned in commit 5ecee9d082

mentioned in commit 5ecee9d082b1a60d12567fb97b37423f19b2851b
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/ustr-cmm!30
No description provided.