Skip to content

Add Audit Logging to Asset Operations#366

Merged
truthixify merged 4 commits intoDistinctCodes:mainfrom
codebestia:feat/asset-integration
Oct 5, 2025
Merged

Add Audit Logging to Asset Operations#366
truthixify merged 4 commits intoDistinctCodes:mainfrom
codebestia:feat/asset-integration

Conversation

@codebestia
Copy link
Contributor

@codebestia codebestia commented Oct 5, 2025

Description

This PR implements automated audit logging for critical asset operations in the AssetsUp contract, ensuring better traceability and compliance

Changes

  • Added automatic audit logging for key asset operations:
    • register_asset: Logs "PROCURED" action
    • update_asset_status: Logs "IN_MAINTAINANCE" or "DISPOSED" actions
  • Extended test coverage to verify audit trail creation
  • Maintained existing error handling and access control

Technical Details

  • Uses existing log_action for consistent audit trail
  • Audit logs are tied to asset ID and include:
    • Action type (PROCURED/IN_MAINTAINANCE/DISPOSED)
    • Actor (asset owner)
    • Timestamp
    • Action details

Testing

  • Unit tests verify:
    • Audit log creation on asset registration
    • Status update logging
    • Access control enforcement

Related Issues

Closes #251

@vercel
Copy link

vercel bot commented Oct 5, 2025

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

A member of the Team first needs to authorize it.

@codebestia
Copy link
Contributor Author

GM @truthixify
Please review

@truthixify truthixify merged commit 6e12328 into DistinctCodes:main Oct 5, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CONTRACT] Integrate Asset and Audit Log Contracts

2 participants