Pin listed CW20 code_id and re-check factory whitelist on pair writes #1107
No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic!1107
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/582-cw20-code-id-pin"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #582 (on-chain mitigation). Unblocks the #581 8266 policy statement; listing 8266 still requires live factory 1.9.0 + pair 1.15.0 migrate (or SpaceUSD admin cleared, or wrap-to-10184).
Summary
CreatePairalready checkedContractInfo.code_idagainstWHITELISTED_CODE_IDSonce. Pair swap / provide / withdraw / limit never re-checked, so a listed instance couldMsgMigrateContractonto FoT/rebase wasm (SEC-I H05, invariant P2).code_ids. Write paths fail closed unless live id equals the pin and factoryIsCodeIdWhitelistedis true. GovernanceRefreshPairAssetCodeIds/ Batch after an approved upgrade; refresh refuses unlisted live ids.Factory cw2 1.8.0 → 1.9.0. Pair cw2 1.14.0 → 1.15.0. Playbook:
skills/AGENTS_CW20_CODE_ID_PIN.md. New invariant F6.Test plan
cargo test -p cl8y-dex-tests --lib asset_code_id_pincargo test -p cl8y-dex-tests --lib migration_testsmake verify-issue-582(first pass + retest)cargo clippy/cargo fmtvia pre-commitcode_id+ wasm admin inventory on #582AddWhitelistedCodeId 8266until that migrate is livementioned in issue #582
mentioned in issue #584
mentioned in merge request !1108
mentioned in commit
711ff9cad5mentioned in issue #585