Skip to content

Add a holder registry map that tracks all wallet addresses that have ever held a creator key #831

Description

@Chucks1093

Summary

The snapshot and airdrop functions need to iterate over all holders but there is no on-chain registry of holder addresses. A holder_registry persistent map keyed by key_id storing a vec of all addresses that have ever held the key would provide this foundation.

Scope

  • Maintain a holder_registry Vec in persistent storage keyed by key_id
  • Append a wallet address to the registry on their first ever buy or transfer-in for a given key
  • Never remove addresses from the registry even when their balance reaches zero (for historical accuracy)
  • Provide a get_holder_registry(key_id: BytesN<32>) view function returning the full address vec
  • Bump the TTL of the registry entry on every read and write

Acceptance Criteria

  • New buyer's address appended to registry on first purchase
  • Address not duplicated on subsequent buys by the same wallet
  • Transfer recipient address appended to registry if not already present
  • get_holder_registry returns the full address list correctly
  • TTL bumped on every registry read and write

ETA: 24 hours


Coordinate on Telegram

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