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

Cancel on Partial withdraw #187

Open
sneg55 opened this issue Oct 14, 2024 · 5 comments
Open

Cancel on Partial withdraw #187

sneg55 opened this issue Oct 14, 2024 · 5 comments
Assignees
Labels
effort: medium Default level of effort. priority: 2 We will do our best to deal with this. type: feature New feature or request. work: complicated Sense-analyze-respond. The relationship between cause and effect requires analysis or expertise.

Comments

@sneg55
Copy link

sneg55 commented Oct 14, 2024

We need a doc page on a workaround with Cron for canceling after partial withdrawal from the stream. A few users recently asked me about this case.

@smol-ninja smol-ninja added priority: 2 We will do our best to deal with this. effort: medium Default level of effort. work: complicated Sense-analyze-respond. The relationship between cause and effect requires analysis or expertise. type: feature New feature or request. labels Oct 14, 2024
@PaulRBerg
Copy link
Member

A guide would be helpful, but better than that would be a modification in Lockup/ Airstreams that allows for dynamic claim amounts based on how early (or late) the recipients claim. I will open a separate discussion about this.

@smol-ninja smol-ninja self-assigned this Dec 3, 2024
@smol-ninja
Copy link
Member

Just to confirm, we need a bash script for this, right?

@PaulRBerg
Copy link
Member

@smol-ninja the script can be written in any language, I guess. The catch is to make it easy to automate — maybe via GitHub Actions?

@smol-ninja
Copy link
Member

Since it would require to be pinged upon withdrawal, it won't be possible to do it via GitHub action (or did you mean GitHub actions to deploy the script?).

  • First, campaign creators would need access to all the stream IDs generated as a result of claims. That means tracking Claim event to identify and store streamId on a local db.
  • Then tracking withdraw events emitted by those stream Ids.

Building this would require connecting to subgraph endpoints. Through guide, we can provide information on what all they will need to build this. But if we want to provide a full code, this looks like a separate repo work.

@PaulRBerg
Copy link
Member

Couldn't it be done by a GitHub Actions workflow by using a Cron job that uses cancelMultiple and listens to emitted events, looking for all the streams that have been canceled since the last time the script was run?

Though I think that may lead to a very long run time, and so GitHub may halt the execution.

So a separate repo with custom scripts makes more sense. Feel free to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: medium Default level of effort. priority: 2 We will do our best to deal with this. type: feature New feature or request. work: complicated Sense-analyze-respond. The relationship between cause and effect requires analysis or expertise.
Projects
None yet
Development

No branches or pull requests

3 participants