feat: implement verification expiry (#131) - #401
Open
aymide1ee wants to merge 1 commit into
Open
Conversation
- 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
Contributor
|
@aymide1ee please resolve conflicts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #131
expires_at: Option<u64>field to VerificationRecordStorageKey::VerificationDurationandDEFAULT_VERIFICATION_DURATION_SECS(365 days)ContractError::VerificationExpired = 33AdminManager::set_verification_duration/get_verification_durationexpires_at = now + durationinapprove_verificationVerificationRegistry::is_verification_active— checks expiry, emits event if expiredVerificationRegistry::renew_verification— admin resets expiry on Verified projectVerificationExpiredEventandVerificationRenewedEventwith publish functionslib.rscontract interfaceAcceptance criteria met: