exit-format icon indicating copy to clipboard operation
exit-format copied to clipboard

Allow the claim method to claim multiple guarantees

Open geoknee opened this issue 4 years ago • 1 comments

  • we already allow for the token type and the target channel outcome to be indexed in the transaction calldata, with an escape hatch, empty array [] implying "do them all".
  • if you have many channels virtually funded through the same hub, you will likely want to claim all of the guarantees. SO we should upgrade targetChannelIndex: number to targetChannelIndices: number[].

https://github.com/statechannels/exit-format/blob/62a7c65eeddf159369033410bdde8533e09100c3/nitro-src/claim.ts#L11

geoknee avatar May 10 '21 13:05 geoknee

This presents a bit of a challenge, both:

  1. because we now to specify payout indices for each target, for each target index in some target indices for each asset in the outcome of the "origin" channel. Thus the exitRequest becomes quite complicated.
  2. I anticipate we will run into "stack too deep" difficulties with this large number of variables

geoknee avatar May 14 '21 17:05 geoknee