You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Further to the above post, I was able to get the invoke_tx function to work on fn calls on multisig by setting the CallFlags::TAIL_CALL call flag.
I'm not entirely sure why this works but according to the Ink documentation:
it is advised to use &self receiver with a mutating delegate call, or .set_tail_call(true) to flag that any changes made by delegate call should be flushed into storage.
I don't understand what "&self receiver with a mutating delegate call means" but, if set_tail_call forces the storage to update on the delegate call (i.e. the inner call being invoked by invoke_tx), it would make sense why this solves the problem.
I can't think why an external fn would update storage but a call back into multisig would not (without set_tail_call). Is it because storage doesn't update on the multisig until invoke_tx completes, and, because the delegate call falls out of scope, its changes aren't stored?
I have implemented the Multisig wallet and have successfully created an e2e test to check the functionality.
My e2e flow:
invoke_transaction does not error but requirement does not update either.
eval_transaction errors with:
This problem only occurs when calling functions on Multisig. Calling functions on external contracts works.
The text was updated successfully, but these errors were encountered: