Overview
The audit module (contracts/assetsup/src/audit.rs) keeps an immutable on-chain event trail — the strongest trust story AssetsUp has over competitors ("your audit log cannot be silently edited"). Nothing surfaces it.
What to Build
- Backend ([SC-01] extension): mirror key web2 history events (created, transferred, status changed — align with [SC-02]'s scope) to the on-chain audit log via the queue; store the resulting tx hash on the corresponding
AssetHistoryEvent row ([BE-08] entity gains a nullable chainTxHash)
- Verification endpoint:
GET /api/assets/:id/history/verify — for each mirrored event, re-read the on-chain record and report verified | mismatch | not-anchored
- Frontend: the asset history timeline shows a "verified on-chain" badge per anchored event, with a tooltip (tx hash, ledger, link to Stellar Expert); an asset-level summary chip ("12/14 events anchored"); a "verify now" action that calls the verification endpoint and renders results
- Degrades invisibly when Stellar is not configured — no badges, no errors
References
- Contract:
contracts/assetsup/src/audit.rs
- Blocked by [SC-01], [SC-02], [BE-08]
Acceptance Criteria
Overview
The audit module (
contracts/assetsup/src/audit.rs) keeps an immutable on-chain event trail — the strongest trust story AssetsUp has over competitors ("your audit log cannot be silently edited"). Nothing surfaces it.What to Build
AssetHistoryEventrow ([BE-08] entity gains a nullablechainTxHash)GET /api/assets/:id/history/verify— for each mirrored event, re-read the on-chain record and reportverified | mismatch | not-anchoredReferences
contracts/assetsup/src/audit.rsAcceptance Criteria