Skip to content

feat: implement verification expiry (#131) - #401

Open
aymide1ee wants to merge 1 commit into
HubDApp:mainfrom
aymide1ee:feat/131-verification-expiry-impl
Open

feat: implement verification expiry (#131)#401
aymide1ee wants to merge 1 commit into
HubDApp:mainfrom
aymide1ee:feat/131-verification-expiry-impl

Conversation

@aymide1ee

Copy link
Copy Markdown

closes #131

  • Add expires_at: Option<u64> field to VerificationRecord
  • Add StorageKey::VerificationDuration and DEFAULT_VERIFICATION_DURATION_SECS (365 days)
  • Add ContractError::VerificationExpired = 33
  • Add AdminManager::set_verification_duration / get_verification_duration
  • Stamp expires_at = now + duration in approve_verification
  • Add VerificationRegistry::is_verification_active — checks expiry, emits event if expired
  • Add VerificationRegistry::renew_verification — admin resets expiry on Verified project
  • Add VerificationExpiredEvent and VerificationRenewedEvent with publish functions
  • Expose all new entry points in lib.rs contract interface

Acceptance criteria met:

  • Verification records include expiry timestamp
  • Read APIs expose whether verification is active or expired
  • Admin can configure verification duration
  • Tests updated; expiry/renewed/duration/batch cases covered

- Add `expires_at: Option<u64>` field to VerificationRecord
- Add `StorageKey::VerificationDuration` and `DEFAULT_VERIFICATION_DURATION_SECS` (365 days)
- Add `ContractError::VerificationExpired = 33`
- Add `AdminManager::set_verification_duration` / `get_verification_duration`
- Stamp `expires_at = now + duration` in `approve_verification`
- Add `VerificationRegistry::is_verification_active` — checks expiry, emits event if expired
- Add `VerificationRegistry::renew_verification` — admin resets expiry on Verified project
- Add `VerificationExpiredEvent` and `VerificationRenewedEvent` with publish functions
- Expose all new entry points in `lib.rs` contract interface

Acceptance criteria met:
  - Verification records include expiry timestamp
  - Read APIs expose whether verification is active or expired
  - Admin can configure verification duration
  - Tests updated; expiry/renewed/duration/batch cases covered
@Naomi-Gift

Copy link
Copy Markdown
Contributor

@aymide1ee please resolve conflicts

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Verification Expiry

2 participants