# Setting up a Gnosis Safe MultiSig Wallet

{% 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/documentation-utilisateur-aragon/produits/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.**

Start by opening your Aragon Client DAO, you should see a similar dashboard as in the image below. Click in the left hand menu on 'Permissions':

<figure><img src="https://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FgzgSeWf61esf5vMqc90d%2Fa1_Sig.png?alt=media&#x26;token=cdfbade8-7859-4a55-8d33-cf693d767747" 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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FqVMnYAWMjQgToU26Hwm2%2Fa2_sig.png?alt=media&#x26;token=72ba856e-f3a4-4d76-9eaf-7f4f1ad2ddc4" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FxNhTxFRVHrZNxWg3z9il%2Fa3_sig.png?alt=media&#x26;token=329a374b-9e46-4412-8273-4434ad2f5341" 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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FcXPOPZ33ApwEE4kPA8an%2Fa4_sig.png?alt=media&#x26;token=32c2aa2c-ad30-43e6-b219-d33f47dfb594" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FTwVKcdjWACXs9lV7qset%2Fa5_sig.png?alt=media&#x26;token=d4079404-32ff-4006-91cb-a795587d4407" 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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FtQhOZixWQbHT1EEfeeEH%2Fa6_sig.png?alt=media&#x26;token=019461da-5acd-46f2-a861-dac095238625" 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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FpUaghbQGPZbRXvZeBcxW%2Fa7_sig.png?alt=media&#x26;token=f75ae004-e1e4-4a90-932b-785826e011f5" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2F0mylsRQZPLMdY5qyVFdC%2Fa8_sig.png?alt=media&#x26;token=5dd8a0de-3073-4c7f-bf98-6f705633aace" 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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FVbOz6rjz5KYhzF6z7lRh%2Fa9_sig.png?alt=media&#x26;token=38062d0a-8e75-4f42-aa25-2599f10cbfd4" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FgnY0ADqaZ2c4zGYMNAgS%2Fa10_sig.png?alt=media&#x26;token=87d69e43-130b-43b0-b8da-33f20eb9549a" 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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FAxeTkm12S6MgsCqVOddh%2Fa11_sig.png?alt=media&#x26;token=69e50346-bc2d-4875-8771-7797d74786ea" alt=""><figcaption></figcaption></figure>

Now confirm the vote by clicking 'Yes':

<figure><img src="https://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FPDG95w7EROrBZEEZu6kT%2Fa12_sig.png?alt=media&#x26;token=72bb7898-8cca-4059-987a-a83170be7042" 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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FBTh39Ri3P9LRisKhYkT6%2Fa13_sig.png?alt=media&#x26;token=85a24bef-30f7-4395-9092-802854adc73b" alt=""><figcaption></figcaption></figure>

In our example it confirmed that the vote has passed:

<figure><img src="https://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FLBwC5p6ZOnPYm0AcHrSj%2Fa14_sig.png?alt=media&#x26;token=e9eeacaa-161f-46b8-b0e9-07db161fcdd8" 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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FpWK2Mu7exFYj0cFrX3EN%2Fa15_sig.png?alt=media&#x26;token=93bd192e-64b9-49bc-9b1b-24f7f497ffa3" 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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FFFXLyEdz4LlziKmlXtMC%2Fa16_sig.png?alt=media&#x26;token=1ba9a41b-deff-4a12-a3e6-8fefcf7cf20c" 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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FW8793IibCHFCB8iyKQBR%2Fa17_sig.png?alt=media&#x26;token=6e9b4036-2a78-44e0-bb76-289f3b39e737" 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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FnDFtqtlfyszYbwCjPmL3%2Fa18_sig.png?alt=media&#x26;token=b1f24b50-a566-46b5-808d-226df1b3fddf" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FwC1T1pScvkbJe7YOgpmZ%2Fa19_sig.png?alt=media&#x26;token=ff43bb32-3499-473c-b42c-02150d446ff7" 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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FSEZLHJKzaKNEokArlPFR%2Fa20_sig.png?alt=media&#x26;token=bbc47c92-2e39-4195-a218-e7c5e4e714c2" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2Fh24BuTVoCwvhuaaVnCMm%2Fa21_sig.png?alt=media&#x26;token=94b3b742-f74b-4a90-b632-55ff1202bbb8" 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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FIja85LGVODJyuCCv2jk5%2Fa22_sig.png?alt=media&#x26;token=69eedf7c-966b-40b5-9cad-8bbc1c6787fa" 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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2F2NestvwLPluVI4Oloacd%2Fa23_sig.png?alt=media&#x26;token=76f490e9-8ccb-446e-8f54-a45d789d801c" 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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2F9Xznq2wICPnxUPkEyVY6%2Fa24_sig.png?alt=media&#x26;token=3c6bd6f4-4a4e-4640-b0a2-7f301ffcf593" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
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
{% endhint %}

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://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FnpYdEWMd0kl1Yob225nw%2Fa25_sig.png?alt=media&#x26;token=1d0f4cd9-aa31-4021-a59e-591846b119e6" alt=""><figcaption></figcaption></figure>

Head back for the last time to your Aragon Client DAO :fingers\_crossed:, and open the **Finance** app. In our example we see that a 'Contributor compensation' of 0.1 ETH is displaying in the 'Transfers' overview:

<figure><img src="https://994070158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiO9P3m8elNX5EjBARTqn%2Fuploads%2FQGmGwftQFQvatzsaMZH3%2Fa26_sig.png?alt=media&#x26;token=564c1641-61d9-4769-a1fd-317202988dbd" alt=""><figcaption></figcaption></figure>

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