Then a second signatory approves and finalizes the call by providing the same call to another multisig extrinsic:
# Define the multisig account by supplying its signatories and threshold
keypair_charlie = Keypair.create_from_uri('//Charlie', ss58_format=substrate.ss58_format)
multisig_account = substrate.generate_multisig_account(
signatories=[
keypair_charlie.ss58_address,
'5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',
'5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y'
],
threshold=2
)
extrinsic = substrate.create_multisig_extrinsic(call, keypair_charlie, multisig_account, era={'period': 64})
receipt = substrate.submit_extrinsic(extrinsic, wait_for_inclusion=True)
The call will be executed when the second and final multisig extrinsic is submitted, condition and state of the multig
will be checked on-chain during processing of the multisig extrinsic.
To initiate and finalize multisig extrinsics, the following helper functions are available:
Then initiate the multisig extrinsic by providing the call and a keypair of one of its signatories:
Then a second signatory approves and finalizes the call by providing the same call to another multisig extrinsic:
The call will be executed when the second and final multisig extrinsic is submitted, condition and state of the multig will be checked on-chain during processing of the multisig extrinsic.