Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we set a time limit for using a service? #2

Open
Art3miX opened this issue Oct 17, 2023 · 3 comments
Open

Should we set a time limit for using a service? #2

Art3miX opened this issue Oct 17, 2023 · 3 comments
Labels
V0.2 Add to V0.2

Comments

@Art3miX
Copy link
Collaborator

Art3miX commented Oct 17, 2023

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

@Art3miX Art3miX added the V0.2 Add to V0.2 label Oct 17, 2023
@bekauz
Copy link
Contributor

bekauz commented Oct 17, 2023

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),
}

@Art3miX
Copy link
Collaborator Author

Art3miX commented Oct 18, 2023

You can use cw-utils: https://docs.rs/cw-utils/1.0.2/cw_utils/enum.Expiration.html
it is meant exactly for that.

@uditvira
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V0.2 Add to V0.2
Projects
None yet
Development

No branches or pull requests

3 participants