Skip to content

fix(contracts): guard maintenance logging; add pause, record amend/void, and WASM allowlist - #1695

Open
Ummi-001 wants to merge 1 commit into
DistinctCodes:mainfrom
Ummi-001:feature/maintenance-upgrade-fixes
Open

Ummi-001 wants to merge 1 commit into
DistinctCodes:mainfrom
Ummi-001:feature/maintenance-upgrade-fixes

Conversation

@Ummi-001

@Ummi-001 Ummi-001 commented Oct 19, 2026 •

Copy link
Copy Markdown

Summary

Closes #1477,
Closes #1478,
Closes #1479,
Closes #1496.

asset-maintenance

  • No emergency pause for maintenance logging #1478 — emergency pause. Added an admin-gated pause / unpause (is_paused) covering every mutating entrypoint. The existing source-driven every_mutating_entrypoint_is_covered guard test was extended to the new entrypoints, and PAUSE_EXEMPT documents each deliberate exemption.
  • No test for scheduling maintenance on a burned asset #1477 — detokenized assets. mark_asset_detokenized / reactivate_asset / is_asset_detokenized plus a guard that rejects logging maintenance against a detokenized asset, with AssetDetokenized and events.
  • No way to amend or void a mistaken maintenance record #1479 — mistaken records. void_maintenance_record / amend_maintenance_record (plus is_maintenance_record_voided, get_maintenance_amendment, get_maintenance_void). Voided records are excluded from, and amendments folded into, the AssetStats rollup via recompute_asset_stats.

assetsup

Housekeeping

  • Consolidated the assetsup Error enum from 61 to 49 variants so it fits the 50-case contract-spec limit, with a regression test (the_error_enum_fits_the_contract_spec_limit) and the retired codes recorded in contracts/ERRORS.md.
  • Repaired pre-existing test-build breakage in both crates (stale struct literals, should_panic assertions on renumbered codes, a duplicate integration-test name, a TTL test using Result accessors on non-Result returns), so this change compiles and runs.

Testing

cargo test  -p asset-maintenance -p assetsup   # 111 + 232 pass
cargo clippy -p asset-maintenance -p assetsup --all-targets --all-features -- -D warnings
cargo fmt    -p asset-maintenance -p assetsup -- --check

All three pass for the two touched crates.

Note on repository state

At the time of writing, main does not build: multisig-transfer and the contrib test target have pre-existing compile errors (and cargo fmt --all --check reports unrelated diffs). Those are untouched here; this PR is limited to the crates relevant to the linked issues.

… controls

asset-maintenance (DistinctCodes#1477, DistinctCodes#1478, DistinctCodes#1479):
- reject logging maintenance against a detokenized/reactivated asset
- add an admin-gated emergency pause covering every mutating entrypoint
- add amend/void flags so a mistaken maintenance record can be corrected
  without erasing history

assetsup (DistinctCodes#1496):
- maintain an admin-managed WASM-hash allowlist and require the new hash
  to be approved before `upgrade` runs

Also consolidate the assetsup Error enum (61 -> 49 variants) to fit the
50-case contract-spec limit, and repair pre-existing test-build breakage
in both crates so `cargo test` compiles.

Closes DistinctCodes#1477
Closes DistinctCodes#1478
Closes DistinctCodes#1479
Closes DistinctCodes#1496
@vercel

vercel Bot commented Oct 19, 2026

Copy link
Copy Markdown

@Ummi-001 is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@Ummi-001 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant