Open Art3miX opened 11 months ago
I think that makes sense. In covenant-utils
I use this:
/// enum based configuration for asserting expiration.
/// works by asserting the current block against enum variants.
#[cw_serde]
pub enum ExpiryConfig {
/// no expiration configured
None,
/// block height based expiry config
Block(u64),
/// timestamp based expiry config
Time(Timestamp),
}
You can use cw-utils: https://docs.rs/cw-utils/1.0.2/cw_utils/enum.Expiration.html it is meant exactly for that.
I can imagine this being useful. For example we may only want the a specific covenant service to be allowed to withdraw funds from a valence account for a fixed amount of time.
The account should be able to specify for how long he wants the account to use the service?
Ex: Use a service for a month, and see how it works for you, or use it without a limit to just run it until you pause/deregister from the service