Skip to content

Token Whitelist Logic #15

@Kaylahray

Description

@Kaylahray

User Story

As an Admin,
I want to only allow specific tokens (USDC, XLM) to prevent spam.

Description

A list of allowed token addresses.


Files to Create/Edit

contracts/geev-core/src/
├── storage.rs
└── admin.rs

Functional Requirements

  • Storage: Map<TokenAddress, bool>.
  • Check: Verify token is allowed during creation.

Suggested Implementation

// IN FUNCTION: create_giveaway

// 1. Check storage for 'AllowedToken(token_address)'.
// 2. If false/missing, panic "TokenNotSupported".

// IN FUNCTION: add_token(env, token)
// 1. Admin auth.
// 2. Set 'AllowedToken(token)' to true.

Acceptance Criteria

  • Blocks unknown tokens.

Submission Guidelines

  • Branch: feat/token-whitelist

Metadata

Metadata

Assignees

No one assigned

    Labels

    @geevapp/app/wave2Moving to the app repo, as the contracts repo was not accepted for Drips Wave 2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions