snet-cli
snet-cli copied to clipboard
use MPE.multiChannelClaim in 'snet treasurer claim-*'
In the current version we use MPE.channelClaim to claim funds. But we should use MPE.multiChannelClaim, which will allow claim many payments in one call. It will safe time and, maybe, gas.
There are two important points which should be taken into account:
- We should be careful in order to not hit a gas limit. So we should tests which is a maximum number of payments in MPE.multiChannelClaim and split payments in appropriate batches.
- We should carefully check that all payments are valid (we can simply call MPE.multiChannelClaim before actually transmitting it)