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
Context
- Target file:
src/tokenGateController.ts
- Use
src/timeMachine.ts in tests to simulate time boundaries
Description
src/tokenGateController.tsevaluates 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). AddingvalidFromandvalidUntiloptions to gate configs enables time-bounded access control.Acceptance Criteria
TokenGateConfigaccepts optionalvalidFrom?: DateandvalidUntil?: Datefieldsfalseregardless of balanceContext
src/tokenGateController.tssrc/timeMachine.tsin tests to simulate time boundaries