# Setting up a Gnosis Safe MultiSig Wallet

{% hint style="info" %}
In this section, we will look into how Aragon Client DAOs can be managed by a **MultiSig wallet**.
{% endhint %}

{% hint style="warning" %}
Here we are going to use [**Gnosis Safe MultiSig**](https://gnosis-safe.io), however, you could follow a similar approach for any other MultiSig wallet that supports contract interaction.
{% endhint %}

###

## Setting up the necessary permissions

{% hint style="info" %}
Aragon Client DAOs have access to a control system, where each action is protected by a set of permission records. Only someone with specific permissions can act.

**That is why we need to assign the MultiSig wallet to a range of permissions in the DAO that correspond with the desired actions.**

You can read more about permission settings [here](https://legacy-docs.aragon.org/hindi-aragon-user-documentation/undefined-1/aragon-client/explore-template-dao/system-setting/permissions-setting).
{% endhint %}

In this example an Aragon Client DAO has a balance of ETH tokens stored in its Vault and you want to initiate a payment to compensate a DAO Contributor for her work. We will show how to **initiate a withdrawal of some of the ETH to the Contributor.**

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2F2W6YMUgCDp3e0ydmerGV%2Fa1_Sig.png?alt=media&#x26;token=e2352e73-c16d-4a85-9ada-9048cdb1497f" alt=""><figcaption></figcaption></figure>

We want to add new permissions for your MultiSig, so click in this screen on 'New permission':

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FtXbCG8ch3K9Pwum1r3KN%2Fa2_sig.png?alt=media&#x26;token=8365e37b-1009-42fb-972d-59df95bd7310" alt=""><figcaption></figcaption></figure>

You should see the following side-window appear. Click on 'Select an app':

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FSnrgvZzyhc0l5KXO3hJA%2Fa3_sig.png?alt=media&#x26;token=1e1bcdf7-8ff6-44b8-9cff-376c92e2f526" alt=""><figcaption></figcaption></figure>

For this example we want to initiate a withdrawal of ETH by the MultiSig. This is usually done from the Finance app of the DAO, so select 'Finance' here and then click on 'Select an entity':

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FrXd902DSlIDOBOpB7rP3%2Fa4_sig.png?alt=media&#x26;token=ded6b87a-1e09-4c27-84cb-a35a29a4dfc1" alt=""><figcaption></figcaption></figure>

Since we need to add the address of your MultiSig, click here on 'Custom address...':

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FQwXc2F12ApYP5b5BvNxz%2Fa5_sig.png?alt=media&#x26;token=76b6ec23-8b66-432d-85a8-0556f6becfec" alt=""><figcaption></figcaption></figure>

Now go to your Gnosis Safe, copy its address and paste the address of your MultiSig in the 'GRANT PERMISSION TO' box. Then click on 'Select an action':

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FZrxF7WMlHn4EkheNxRaB%2Fa6_sig.png?alt=media&#x26;token=21de522a-8ead-4f27-ba67-09c0b5c27f1a" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Do not forget to remove the letters from the front of the Gnosis Safe address,**`eth:`**&#x6F;&#x72;**`gor:`**&#x6F;r different depending on the network you use! Otherwise it won't work..

The address should start with: **`0x`**
{% endhint %}

In this case we want to initiate a new payment, so click on 'Create new payments':

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FqWUyGRkTTD5yX5zDxFWA%2Fa7_sig.png?alt=media&#x26;token=c204f930-66ba-45bf-afc1-90be510d7407" alt=""><figcaption></figcaption></figure>

Now you filled the required boxes, click on 'Add permission':

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2Fwblhva57FyhGWi9e1gWM%2Fa8_sig.png?alt=media&#x26;token=e3bb6f2d-de9f-4e5a-8524-c29e9c8d2b58" alt=""><figcaption></figcaption></figure>

Here the app warns that the permission can not be directly changed, but that a vote will be created to change the permission. Click on 'Create transaction':

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FwzJbpYgNnT6vGEo5ARVJ%2Fa9_sig.png?alt=media&#x26;token=57b8f8c8-834b-4dfd-911c-134d45b449bc" alt=""><figcaption></figcaption></figure>

A transaction should pop-up in your Web3 Wallet, 'Confirm' the transaction:

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FPRpMXVhXQHGRe3GDAYbS%2Fa10_sig.png?alt=media&#x26;token=2e3e4fea-1dbb-48b3-9d8f-a61b8476f6e8" alt=""><figcaption></figcaption></figure>

Once the transaction has processed, head over to the 'Voting' app of your DAO. You should see that an open vote has been generated. Click on the vote:

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FSR2wL06HiHKQTqnKOcbP%2Fa11_sig.png?alt=media&#x26;token=1cf261ce-b280-4c79-b3b6-06ad78ef9296" alt=""><figcaption></figcaption></figure>

Now confirm the vote by clicking 'Yes':

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FeQMIaCUvYhmLU0bqPXrT%2Fa12_sig.png?alt=media&#x26;token=2d56e187-e012-4dc1-b5a1-dc221e2ed7ba" alt=""><figcaption></figcaption></figure>

Click here on 'Create transaction' and confirm the transaction that should pop-up in your Web3 Wallet:

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2F8IpKuCEoH0GmsradGPND%2Fa13_sig.png?alt=media&#x26;token=4a363128-74b0-4cdc-a49b-6e456b462b81" alt=""><figcaption></figcaption></figure>

In our example it confirmed that the vote has passed:

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FEafFfmadNyhigRUAjRpf%2Fa14_sig.png?alt=media&#x26;token=c35881c1-9e4d-47f5-b80e-57633b9c3aa8" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
More DAO members might need to approve the vote for the vote to pass. This depends on the **SUPPORT** and **MINIMUM APPROVAL** settings of your DAO
{% endhint %}

Now head over to the 'Permissions' app to check whether the permission for your MultiSig has been added. In our case click on the **Finance** app, and then unfold the 'Create new payments' permission. We now see that the MultiSig address has appeared!

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FKsFpV4lHwW4Es5HaSfNT%2Fa15_sig.png?alt=media&#x26;token=6feace61-cd32-4a24-9794-330fd9c94a0a" alt=""><figcaption></figcaption></figure>

## Initiate payment at the MultiSig

Now that's done we can initiate a payment at the MultiSig!

Head back to the (in this case) Gnosis Safe and press on 'New Transaction'. In the pop-up window which appears, press 'Contract Interaction':

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FMqXPmEAyg7UnwD2ga4Yf%2Fa16_sig.png?alt=media&#x26;token=ed3aa534-5159-4bc2-ae83-9553bb77a6cc" alt=""><figcaption></figcaption></figure>

We now need the 'Contract address' of the app we want to interact with, which is the Finance app in this case:

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2F3ocMfqrLxaQ90o4VZUb9%2Fa17_sig.png?alt=media&#x26;token=18ae48bf-dc81-4013-82f3-82936920d1cb" alt=""><figcaption></figcaption></figure>

So head back to your Aragon Client DAO, open the **Organization** app, click on the address under (in this case) 'FINANCE', and copy the address:

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FILpU5E35UFSlr8jYiykP%2Fa18_sig.png?alt=media&#x26;token=ccac0be4-9bf9-414d-bfdb-31113685f6d9" alt=""><figcaption></figcaption></figure>

Paste the address in the 'Contract address' field back in the Gnosis Safe:

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FKDAtl9LWVMI8OVaJMYDX%2Fa19_sig.png?alt=media&#x26;token=0f40e675-92f2-4447-a099-df76401d9066" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
If the 'ABI' field automatically populates, **REMOVE** all the contents in the field, since we will need a different ABI
{% endhint %}

Now we need to get the ABI of the base contract of the app we interact with, which is the **Finance** app in this case. Click on 'Finance App' in the box below:

{% hint style="info" %}
You can find Etherscan links to the smart contracts of the most used apps below:

* [Tokens App](https://etherscan.io/address/0xde3A93028F2283cc28756B3674BD657eaFB992f4#code)
* [Finance App](https://etherscan.io/address/0x836835289A2E81B66AE5d95b7c8dBC0480dCf9da#code)
* [Voting App](https://etherscan.io/address/0xb935C3D80229d5D92f3761b17Cd81dC2610e3a45#code)
  {% endhint %}

On the Etherscan page, scroll down until you see the 'Contract ABI' box. Click on the Copy symbol, to copy the ABI of the smart contract:

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2Fii2h6XcApzKyIvIMQGbp%2Fa20_sig.png?alt=media&#x26;token=3c99e6a1-fb78-40ad-906c-9a0548056c23" alt=""><figcaption></figcaption></figure>

Paste the ABI in the 'ABI' field in the Gnosis Safe, and click on 'Method':

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FqBBPMU57JDnH1FPEnqor%2Fa21_sig.png?alt=media&#x26;token=c37afc89-bbd3-417f-bd5d-0d3633920b63" alt=""><figcaption></figcaption></figure>

Search here for 'newImmediatePayment', since we want to do an immediate payment in this example, and select it:

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FQ8tLW2YNzowd9IZ9mfI5%2Fa22_sig.png?alt=media&#x26;token=d604173e-c29b-4600-aedb-ddc02f3a415b" alt=""><figcaption></figcaption></figure>

Now find the 'token address' of the token you want to send. In this case we are sending ETH. The token address of ETH is: `0x0000000000000000000000000000000000000000`

Add the 'receiver address' of in this example the Contributor.

Then add the 'amount'. In this case we will send the DAO Contributor an amount of 0.1 ETH.

{% hint style="danger" %}
For the 'amount' field, add 18 decimals to the original value. For example, if you want to invoke th&#x65;**`newImmediatePayment`**&#x6D;ethod to transfer 10.5 tokens, you will have to input 10.5 \* 10 ^ 18 = **`10500000000000000000`** into the amount field.
{% endhint %}

In our example the amount is 0.1 \* 10 ^ 18 = `100000000000000000`

Then you can add a 'reference string' as a payment reference, and click on 'Review':

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FH2AyxIjg4H8F7DCPnvwx%2Fa23_sig.png?alt=media&#x26;token=23cc7b99-aa78-4ece-b1b3-a41bbdb01c93" alt=""><figcaption></figcaption></figure>

Scroll down and test the transaction by clicking on 'Simulate'. If all is well it should display 'Success'. If so, click on 'Submit':

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FsY6H9d9iJFZNUd5WLv8V%2Fa24_sig.png?alt=media&#x26;token=bd5c294d-4d88-4eb6-9bf3-144c745343c1" alt=""><figcaption></figcaption></figure>

If the **simulation has failed** and you get warnings (like a gas estimation error) there has likely been a mistake either in permissions, method parameters, or ABI and contract address. Please go through the setup again

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2FCASE0UC1bJjFZhTiSPvq%2Fa25_sig.png?alt=media&#x26;token=9da9996f-5660-447d-8e2c-ca9b99c9417f" alt=""><figcaption></figcaption></figure>

A transaction should pop-up in your Web3 Wallet. 'Confirm' the transaction and wait for it to be processed. If all good, it executed:

<figure><img src="https://4115552218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqbJnwSlPYXvqQ6buM1wp%2Fuploads%2F39nZ9KJyou4LPARaHmFa%2Fa26_sig.png?alt=media&#x26;token=84f7e7fa-2f94-409e-b7a7-909e11dfc013" alt=""><figcaption></figcaption></figure>

We did it! :partying\_face: Well done! :medal:
