effectai / effect-network

Smart contracts and documentation for Effect Network
MIT License
46 stars 9 forks source link

Implement: rmbatch #107

Closed djmbritt closed 1 year ago

djmbritt commented 1 year ago

Feature

Given a batchid the corresponding batch needs to be deleted.

Description

What should the limitations be? Only the owner of the batch should be able to delete the batch. What should happen with the rest of the efx stored in the batch?

This also raises the question about what to do with the funds in the batch. What if there are users who have completed tasks in the batch, but have not yet claimed their task reward. Where will the funds be stored until the user has claimed the task reward?

Or maybe the requester can only pause the batch, until all users have claimed their rewards.

Steps

The implementation should be relatively easy, there should be a couple of other examples where this is already implemented. Look at this one as an example: https://github.com/effectai/effect-network/blob/8f9f51de9ca33ba1b7a0bdd39b4ad32461a7a516/contracts/force/force.cpp#L52

jeisses commented 1 year ago

This action already exists, but we need a mechanism to refund the EFX. @jabbarn is working on this ticket: https://github.com/effectai/effect-network/issues/87

Removing a batch also has the upside that we can remove the submissions: https://github.com/effectai/effect-network/issues/94

I'm closing this ticket in favor of those 2