Skip to content

[Contract] Guild Member Inactivity Pruning Logic #377

@gabito1451

Description

@gabito1451

Independence Note: Implement specifically inside isolated tests without wiping real instances.

Context:
In communities with thousands of members, we need a way to track if someone has been inactive for years to potentially prune them from governance voting arrays.

Objective:
Track the 'Last Active' ledger sequence for each member.

Acceptance Criteria:

  • In the Guild Membership struct, add a field last_active_at (u64 sequence).
  • Update this field whenever the member performs any action (votes, applies for bounty).
  • Implement is_inactive(address) which returns true if no action in > 1,000,000 ledgers.
  • Add unit tests simulating activity and verifying the inactivity flag changes correctly.

Technical Pointers:

  • Recording a u64 is incredibly cheap and provides foundational data for future DAO optimizations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions