WIP: Draft: chore(treasury): remove obsolete SwapDeposit / swap_contract (#8) #29

Closed
PlasticDigits wants to merge 0 commits from 8-chore-treasury-remove-obsolete-swapdeposit-swap-contract-bundle-with-5-migrate- into master
PlasticDigits commented 2026-08-05 01:45:00 +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

Closes #8

## 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 Closes #8
PlasticDigits (Migrated from gitlab.com) closed this pull request 2026-08-05 01:45:37 +00:00

Pull request closed

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!29
No description provided.