Skip to content

tokenGateController.ts: Add support for time-bounded token gate windows #693

Description

@Kingsman-99

Description

src/tokenGateController.ts evaluates token gate conditions based on balance thresholds only. Some use cases require gates that are only active during a specific time window (e.g., early-access periods). Adding validFrom and validUntil options to gate configs enables time-bounded access control.

Acceptance Criteria

  • TokenGateConfig accepts optional validFrom?: Date and validUntil?: Date fields
  • A gate evaluation outside the time window returns false regardless of balance
  • A gate without time constraints evaluates balance only (no behavior change)
  • Unit tests pass

Context

  • Target file: src/tokenGateController.ts
  • Use src/timeMachine.ts in tests to simulate time boundaries

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions