> For the complete documentation index, see [llms.txt](https://docs.parallel.best/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parallel.best/developers-hub/parallel-v2/super-vault-sv/proxy-design/mimoproxyfactory.md).

# MIMOProxyFactory

The `MIMOProxyFactory` handles :&#x20;

* MIMOProxys' deployments
* MIMOProxys' ownerhip transfers
* MIMOProxys' permission clearing

## Write Methods :

### `deploy()`

Deploys a new `MIMOProxy` and `MIMOProxy` guard for the caller. The caller must not owner any other `MIMOProxy`

### `transferOwnership(address proxy, address newOwner)`

Initiates the ownership transfer process to a new owner and must be followed by a `claimOwnership` call by the new owner to complete the transfer. Sets the `newOwner` address as a `pendingOwner` of the transferred `MIMOProxy`.

Requirements :&#x20;

* Must be called by the transferred `MIMOProxy` owner
* Cannot transfer ownership to `address(0)`
* New owner must not own any other `MIMOProxy`

| Param Name | Type    | Description                            |
| ---------- | ------- | -------------------------------------- |
| `proxy`    | address | Address of the `MIMOProxy` to transfer |
| `newOwner` | address | Address of the new owner               |

### `claimOwnership(address proxy, bool clear)`

Completes the ownership transfer process.

Requirements :&#x20;

* Must be called by the `pendingOwner` of `proxy`
* Caller must not own any other `MIMOProxy`

| Param Name | Type    | Description                                                         |
| ---------- | ------- | ------------------------------------------------------------------- |
| `proxy`    | address | Address of the `MIMOProxy` to claim                                 |
| `clear`    | bool    | Clear existing proxy permissions if true and maintain them if false |

### `clearPermissions(address proxy)`

Deploys a new `MIMOProxyGuard` for the targeted `proxy` therefore clearing all existing permissions.

Requirements :&#x20;

* Must be called by `proxy` owner

| Param Name | Type    | Description                                               |
| ---------- | ------- | --------------------------------------------------------- |
| `proxy`    | address | Address of the `MIMOProxy` for which to clear permissions |

### `setMinGas(address proxy, uint256 minGas)`

Sets a new `minGas` value for the targeted `proxy`.

Requirements :&#x20;

* Must be called by `proxy` owner

| Param Name | Type    | Descripton                                                                                                                                                                                              |
| ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `proxy`    | address | Address of the `MIMOProxy` to update                                                                                                                                                                    |
| `minGas`   | uint256 | Gas to reserve for running the remainder of the `execute` function after the `delegatecall` in the `MIMOProxy`. Prevents the proxy from becoming unusable if EVM opcode gas costs change in the future. |

## View Methods

### `isProxy(address proxy)`

Checks if an address is a valid `MIMOProxy`.

**Call Params**

| Name    | Type    | Description                         |
| ------- | ------- | ----------------------------------- |
| `proxy` | address | Address of the `MIMOProxy` to check |

**Return Values**

| Name     | Type | Description                                           |
| -------- | ---- | ----------------------------------------------------- |
| `result` | bool | `true` if proxy has been deployed and `false` if not. |

### `getProxyState(address proxy)`

Returns the targeted `proxy` state.

**Call Params**

| Name    | Type    | Description                                    |
| ------- | ------- | ---------------------------------------------- |
| `proxy` | address | Address of the `MIMOProxy` to fetch state from |

**Return Values**

| Name         | Type   | Description                                                                                                                                           |
| ------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `proxyState` | struct | <p>ProxyState : </p><ul><li><code>address owner</code> </li><li><code>IMIMOProxyGuard proxyGuard</code></li><li><code>uint256 minGas</code></li></ul> |

### `getCurrentProxy(address owner)`

Returns the `MIMOProxy` address for a specific `owner`.

**Call Params**

| Name    | Type    | Description               |
| ------- | ------- | ------------------------- |
| `owner` | address | The address of the owner. |

**Return Values**

| Name    | Type         | Description                   |
| ------- | ------------ | ----------------------------- |
| `proxy` | `IMIMOProxy` | The `MIMOProxy` of the owner. |

#### `getPendingOwner(address proxy)`

Returns the pending owner of a specific `proxy`.

**Call Params**

| Name    | Type    | Description                |
| ------- | ------- | -------------------------- |
| `proxy` | address | Address of the `MIMOProxy` |

**Return Values**

| Name           | Type    | Description                                                                     |
| -------------- | ------- | ------------------------------------------------------------------------------- |
| `pendingOwner` | address | Pending owner who has yet to claim the ownership of the transferred `MIMOProxy` |

#### `getProxy()`

Returns the address of the `MIMOProxy` associated with the `MIMOProxyGuard`.

#### `proxyFactory()`

Returns the `proxyFactory` address.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.parallel.best/developers-hub/parallel-v2/super-vault-sv/proxy-design/mimoproxyfactory.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
