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
ETA: 24 hours
Coordinate on Telegram
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
Acceptance Criteria
ETA: 24 hours
Coordinate on Telegram