Feature description
In the current Single Notarization Move package the function notarization::is_destroy_allowed() - being used by notarization::destroy() - only uses the function timelock::is_timelocked_unlock_at() for Dynamic Notarizations to check if the notarization object is locked.
As the current version of Single Notarization uses an outdated timelock enum with a minimal set of enum variants this is OK for the current implementation.
When the timelock enum is extended during future development - i.e. using the tf_components::timelock enum - this is NOK.
Before extended timelock enums like tf_components::timelock (i.e. providing the TimeLock::Infinite variant) can be used, the currently used function timelock::is_timelocked_unlock_at() in notarization::is_destroy_allowed() needs to be replaced by a function or functionality that checks for the existing timelock:
- if it is
TimeLock::UntilDestroyed --> destroy is allowed
- if
timelock::is_timelocked() returns false --> destroy is allowed
The intend of the function notarization::is_destroy_allowed() is primarily to check if a timelock is locked and that it's not locked by the UntilDestroyed variant.
Motivation
Prepare function notarization::is_destroy_allowed() for future development and usage of the tf_components::timelock enum which i.e. provides the TimeLock::Infinite variant.
Requirements
Open questions
No response
Are you planning to do it yourself in a pull request?
No
Feature description
In the current Single Notarization Move package the function
notarization::is_destroy_allowed()- being used bynotarization::destroy()- only uses the functiontimelock::is_timelocked_unlock_at()for Dynamic Notarizations to check if the notarization object is locked.As the current version of Single Notarization uses an outdated
timelockenum with a minimal set of enum variants this is OK for the current implementation.When the
timelockenum is extended during future development - i.e. using thetf_components::timelockenum - this is NOK.Before extended timelock enums like
tf_components::timelock(i.e. providing theTimeLock::Infinitevariant) can be used, the currently used functiontimelock::is_timelocked_unlock_at()innotarization::is_destroy_allowed()needs to be replaced by a function or functionality that checks for the existing timelock:TimeLock::UntilDestroyed--> destroy is allowedtimelock::is_timelocked()returns false --> destroy is allowedThe intend of the function
notarization::is_destroy_allowed()is primarily to check if a timelock is locked and that it's not locked by the UntilDestroyed variant.Motivation
Prepare function
notarization::is_destroy_allowed()for future development and usage of thetf_components::timelockenum which i.e. provides theTimeLock::Infinitevariant.Requirements
Open questions
No response
Are you planning to do it yourself in a pull request?
No