kabocha-network/pallet_supersig

Use``DispatchResultWithPostInfo`` instead of only ``DispatchResult``, and move out execution logic

gdnathan opened this issue · 0 comments

As out extrinsic weights is very variable "ie: the approve_call might actually execute a whole call, it would be better to compute the weight used in the extrinsic, instead of making the user always pay for the worst case scenario.

We should also move out the actual call execution from the approve_call extrinsic, by, for example, moving approved calls into a different storage, and the on_initialize hook will execute a maximum of available approved calls (we can execute a fixed maximum number, or a fixed maximum weight for example), and pop them out of the storage.

Issue: As the unbounded storage are slowly becoming deprecated by substrate, we cannot just store a vector of "approved calls". We need a better way