Getting Started
- Fork the repository: https://github.com/JointSave-org/Joint_Save
- Clone your fork:
git clone https://github.com/<your-username>/Joint_Save.git
cd Joint_Save
- Create a new branch:
git checkout -b feat/admin-audit-log
Overview
Pool admins can now pause/unpause pools, add/remove members, and trigger emergency withdrawals — all real, consequential actions. Checked the codebase and confirmed there's no audit trail anywhere showing who did what and when, beyond whatever's visible in the general activity feed (which is focused on deposits/payouts, not admin actions specifically).
Requirements
- Add a new Supabase table
admin_actions (pool_id, admin_address, action_type, target_address nullable, metadata jsonb, created_at)
- When any admin-only contract function succeeds (pause, unpause, add_member, remove_member, emergency_withdraw, set_treasury, etc.), log an entry to this table from the relevant API route or hook, right after the transaction confirms
- Add RLS so this table is readable by any actual member of the pool (not just the admin), since transparency about admin actions benefits everyone in the pool — but not writable by anyone except server-side code, following the pattern already established for other write-restricted tables
- Add a simple "Admin Activity" section on the group detail page showing this log, visible to all members
Acceptance Criteria
Getting Started
Overview
Pool admins can now pause/unpause pools, add/remove members, and trigger emergency withdrawals — all real, consequential actions. Checked the codebase and confirmed there's no audit trail anywhere showing who did what and when, beyond whatever's visible in the general activity feed (which is focused on deposits/payouts, not admin actions specifically).
Requirements
admin_actions(pool_id, admin_address, action_type, target_address nullable, metadata jsonb, created_at)Acceptance Criteria