1

I would like to correctly monitor the events that are related to multisig transactions and I was wondering if I should always expect the following event pairs :

  • NewMultisig <> Reserved
  • MultisigExecuted <> Unreserved

to be triggered. Also, will the reservation amount always be the same?

1 Answer 1

1

The event pairs will/should always happen one after another when we have a NewMultisig or a MultisigExecuted event.

More specifically these events will happen in the following order as we check the code in substrate :

  • When a new multisig tx is created :

    • This means that we have the 1st approval so the function approve_as_multi is called from the Multisig Pallet.

    • Then this function calls the operate function and the reserve will happen either here or here.

    • These functions will then trigger the event Reserved from the balances pallet

    • Then you can see that the NewMultisig event will be called after.

  • When a multisig tx is executed :

    • This means that we have the last approval so the function as_multi is called from the Multisig pallet.
    • Then this function again calls the operate and the unreserve functions.
    • This function will then trigger the event Unreserved from the Balances pallet.
    • Last the event MultisigExecuted is triggered after the unreserve.

*** The reservation amount is calculated based on the following formula :

DepositBase will be reserved if this is the first approval, plus threshold times DepositFactor. It is returned once this dispatch happens or is cancelled.

and an example on how to calculate it in Westend is shown in detail this post

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.