# Creating Contract using UI

1. Guardian instance out of the box contains implementations for ‘Wiping’ and ‘Retirement’ contracts which can be deployed/enabled from the UI.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FT2LCrHdH1gOctgdAYV88%2Fimage.png?alt=media&#x26;token=130136f1-134f-46e1-a663-fca3f16b6711" alt=""><figcaption></figcaption></figure>

2. Each SR has its own contract permissions. Since contracts are deployed on Hedera and their methods can be called independently via 3rd party systems but the status of these contracts can change without Guardian’s knowledge. SRs can action a ‘refresh’ of their permissions by clicking on the refresh sign (chargeable Hedera operation, costs < 1 hbar)

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FHOLMzGQLkAYgJuFMN1BA%2Fimage.png?alt=media&#x26;token=4634c2c1-c533-431d-96f7-358a1d95868e" alt=""><figcaption></figcaption></figure>

### **Contract Roles:**

#### 1. Wiping Contract Roles:

| Role    | Permissions                                                                  |
| ------- | ---------------------------------------------------------------------------- |
| OWNER   | <ol><li>Add/Remove ADMIN</li><li>Clear Requests</li></ol>                    |
| ADMIN   | <ol><li>Enable/Disable Wiper Requests</li><li>Add/Remove MANAGER</li></ol>   |
| MANAGER | <ol><li>Add/Remove WIPER</li><li>Approve/Reject/Ban WIPER requests</li></ol> |
| WIPER   | <ol><li>Wipe Tokens</li></ol>                                                |

#### 2. Retirement Contract Roles:

| Role  | Permissions                                                             |
| ----- | ----------------------------------------------------------------------- |
| OWNER | <ol><li>Add/Remove ADMIN</li><li>Clear Retire Requests/Pools</li></ol>  |
| ADMIN | <ol><li>Set/Unset Pools</li><li>Approve/Unset Retire Requests</li></ol> |

4\)   At the token creation the system can be configured to delegate all permissions for wiping tokens to a specific wiping contract

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FAwoH2Y98VBb8rdOcMrLo%2Fimage.png?alt=media&#x26;token=4bf8fca6-1a79-4aad-bb1a-cd2108b0c9a1" alt=""><figcaption></figcaption></figure>

5\)   *SRs* can add pools with tokens which have a wipe contract (Set pool operation in retire contract).&#x20;

Also you can check “without approval” to set retirement tokens as immediate operation (without approval).<br>

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FldnWPsJt2b54vsh78hoc%2Fimage.png?alt=media&#x26;token=440eeee9-4c8f-4ad4-a032-9fe4d40436f2" alt=""><figcaption></figcaption></figure>

6\)   *SRs* can check/delete/refresh pools (Pools operation in retirement contract). Not enabled means that the retirement contract has no wiper permissions in the appropriate wipe contract. It will be changed to enabled automatically when *the SR* approves a request for a wiper role from this retirement contract. If the wipe contract is not in Guardian a manual refresh is required to update the instance permissions status.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FlWIfB0xN5uFDWaRXjY4W%2Fimage.png?alt=media&#x26;token=6126fc7f-67ce-42ef-82d4-a9e8f5a10e17" alt=""><figcaption></figcaption></figure>

7\)   *SRs* can check/approve/reject/ban requests for the wiper role in the wipe contract (Requests operation in wipe contract).

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2F7abFOiUHJWQuPbQ82LDN%2Fimage.png?alt=media&#x26;token=57a8c3d9-d1eb-43fc-8288-21e69489a353" alt=""><figcaption></figcaption></figure>

8\)   To execute the retirement Guardian users which hold USER role navigate to the ‘Retire’ tab and click on ‘Retire’ button, choose appropriate pool and set token count/serials

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FoWd08Gisj0tuJvNNp7d2%2Fimage.png?alt=media&#x26;token=c6486e4f-8e63-450d-b638-03c63811cb03" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FzuwAo3Txv8ZCKNzA9ZCd%2Fimage.png?alt=media&#x26;token=39488986-47f4-4323-b70f-9769292363a3" alt=""><figcaption></figcaption></figure>

9\)   If a token retirement requires approval, *users* which hold USER role can see their requests by clicking on the ‘Requests’ button.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FXRM4bKZVmKN5u21PgWXQ%2Fimage.png?alt=media&#x26;token=39090815-d162-4583-8084-15cb73e705f6" alt=""><figcaption></figcaption></figure>

10\)  Contract owners can also see these requests and approve or reject (Requests operation on retirement contract).

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2F8PaCY9Lx4Gem7alBpHqs%2Fimage.png?alt=media&#x26;token=82a3c42e-46b6-4953-aa9a-13915a3f0ea9" alt=""><figcaption></figcaption></figure>

11\)  After approval or rejection of the requests *users* which hold USER role can see retire VCs on ‘Retire’ tab

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FLAoStSlY4PBpILsrF1un%2Fimage.png?alt=media&#x26;token=85460ac9-ca72-45c7-a28f-70ea6befccf4" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FIepzRJaCte0dLdsCjsCM%2Fimage.png?alt=media&#x26;token=92345556-7f69-4f7c-97c1-3cdffb4f4d10" alt=""><figcaption></figcaption></figure>
