-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Labels
Description
An audit trail module that records significant events for each asset on-chain, accessible to any caller.
Requirements
AuditEntry struct (in audit.rs): timestamp: u64, action: String, actor: Address, details: String
append_audit_log(env, asset_id, action, actor, details) — Internal function. Reads the current log vec for the asset, appends the new entry, stores back. Used by asset, tokenization, insurance, and leasing modules to record events.
get_asset_log(env, asset_id) — Returns Vec<AuditEntry> (empty vec if no history).
Integration: Wire append_audit_log calls into register_asset, transfer_asset_ownership, retire_asset, and major state changes in tokenization/insurance/leasing.
Acceptance Criteria
- Audit log grows correctly with each recorded action
- Log retrieval returns entries in chronological order
- Internal function cannot be called directly from outside the contract
Reactions are currently unavailable