Skip to content

Implement on-chain key subscription access gating with minimum hold check #953

Description

@Chucks1093

Summary

Build the subscription access gating function that verifies a wallet holds the minimum required key balance and stamps a valid subscription in persistent storage.

Scope

  • subscribe() checks caller balance against min_hold_for_access config
  • Stamps subscription with expiry ledger calculated from holding duration
  • is_subscribed() view function for access gate checks
  • SubscriptionGranted event emitted on successful subscription
  • Subscription revoked automatically when holding drops below minimum

Acceptance Criteria

  • subscribe() rejects wallets below minimum holding threshold
  • Expiry ledger calculated correctly from holding duration
  • is_subscribed() returns accurate state at any ledger
  • SubscriptionGranted event emitted with correct wallet and expiry
  • Unit tests cover qualifying hold, insufficient hold, and expiry cases

ETA

24 hours

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions