Skip to content

Implement whitelist-gated buy function for early access keys #998

Description

@Chucks1093

Summary

Extend the creator key contract with an optional whitelist gate on buy transactions, allowing creators to restrict purchases to a pre-approved set of wallet addresses during an early access window.

Scope

  • set_whitelist(key_id, wallets[]) — creator-only, batch add wallets
  • remove_from_whitelist(key_id, wallet) — creator-only
  • is_whitelisted(key_id, wallet) — view check
  • buy function checks whitelist when gate is active
  • disable_whitelist(key_id) — permanently opens buys to all

Acceptance Criteria

  • Buy blocked for non-whitelisted wallets when gate is active
  • Whitelisted wallets buy successfully while gate is active
  • disable_whitelist opens buys correctly and cannot be re-enabled
  • Batch set_whitelist handles up to 100 wallets per call
  • WhitelistUpdated event emitted on every add and remove

ETA

24 hours

Activity

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

Metadata

Metadata

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