Set up a multisig wallet on Avail DA
You can use the avail-apps (opens in a new tab) explorer to set up and start using a multisig wallet on Avail DA. This guide will show you how to do so.
PREREQUISITES
The only prerequisite is that you have access to one or more Avail DA accounts.
Refer to our docs on setting up an Avail wallet for more details if needed
Create a multisig wallet on Avail DA
Import the signatory accounts
You need to import into the explorer all the accounts you want added as signatories to the multisig.
There are two ways to do this:
- Go to the
addresses
(opens in a new tab) page of the explorer. - Click on
Add contact
and save any addresses you want.
Start setting up the multisig
Go to the accounts page of the avail-apps explorer (opens in a new tab), and click on Multisig
. This will give you a UI interface
that will allow you to configure your multisig wallet.
DOUBLE CHECK
Please note that a multisig account created on one network won't be created automatically on another. This
tutorial is based on he Turing testnet, but will work just as well for Avail DA mainnet too.
Configure the multisig
- Select all the signatories you want to include in the multisig wallet.
You can do so either by:
- Importing addresses from your address book, or,
- by uploading the json file outlined in
step 1
.
- Select the
threshold
value for the multisig. It represents the minimum number of addresses that need to approve a transaction for it to be executed. Athreshold
value of2
in our case would mean that any2
of the3
signatories can perform a transaction from the multisig. - Choose an appropriate name for the multisig.
- Click on
Create
.
BUT WHAT OF OTHER SIGNATORIES?
An obvious question that pops up is how will other signatories import the multisig wallet into the avail-apps
explorer on their own machine?
Due to the way the multisig
pallet works on Avail DA, a multisig derived from the same set of addresses and the same threshold
value
will always have the same address.
Thus, all signatories can simply create a multisig on their machine with addresses of all the other signatories along with a constant threshold value
to derive the same 'multisig address'.
Alternatively, a single json file with all signatories can be created and shared among all signatories.
The next steps will take you through using your multisig wallet for the first time. Please send some tokens to the multisig's address before proceeding.
Use a multisig wallet on Avail DA
Create a transaction to transfer funds
You should now be able to see your new multisig account created under a seperate category on the
accounts page (opens in a new tab). Click on send
to start creating a new transaction.
Enter the recipient and the amount to transfer, and click on Make Transfer
.
Sign and submit the transaction
You will now be able to sign a balances.transferKeepAlive
transaction from the multisig account.
This extrinsic allows you to transfer funds from one account to another.
- A transaction for a multisig can only be created via an approved signatory. Choose one from the
multisig signatory
dropdown.
PLEASE NOTE
You can only sign a transaction for the multisig from the signatory accounts you have access to.
If you don't have access to an authorised signatory, you can't create, approve, or reject a transaction
for the multisig.
-
Copy the hexadecimal value of the
multisig call data
. This value will be needed later on. -
Make sure that the
sign and submit
on the bottom-left option is checked. Finally, click on theSign and Submit
button on the bottom right.
Approve and/or execute the transaction
Now that a transaction has been created, other signatories have the choice to either:
- Approve the transaction, or,
- Reject the transaction.
You will see a pink icon next to your multisig wallet that indicates a pending transaction. Click on 'View Pending Transactions' to take a look.
Click on approval type
to simply approve or reject the transaction.
-
Our
threshold
value was set at2
, and we already have one approval in form of the signatory that originally created the transaction. -
Thus, an approval by just one more authorised signatory will execute the transaction that will transfer
10 AVAIL
to the recipient.
But what if you simply want to approve the transaction without executing it? Avail DA's multisig implementation
allows for this functionality too.
Let us say you are the final signatory whose approval will mean the transaction has enough approvals
to be executed.
But you don't want to execute the transaction just yet.
You only want to approve it, and let some other signatory execute it later on.
-
If a signatory wants to approve the transaction without executing it, they don't need the
multisig call data
value. -
Make sure the
multisig message with call
button is unchecked, and click onApprove
. -
Then, click on
Sign and Submit
and execute the transaction.
POINTS TO NOTE
- After the
threshold
value of minimum number of approvals has been met, any signatory can execute the transaction. - You cannot execute the transaction without the
multisig call data
value.