# Creator

## Creator

### Contents

### Globals

> Note this list contains both internal and external attributes

| Var         | Type    |
| ----------- | ------- |
| admin       | address |
| marketPlace | address |

### Modifiers

#### authorized

Restricts `msg.sender` as the only viable caller of a method

**Declaration**

```solidity
modifier authorized
```

### Functions

#### create

Allows the owner to create new markets

**Declaration**

```solidity
function create(
uint8 p,
address u,
uint256 m,
address c,
address sw,
string n,
string s,
uint8 d
) external authorized returns
(address, address)
```

**Modifiers:**

| Modifier   |
| ---------- |
| authorized |

**Args:**

| Arg  | Type    | Description                                              |
| ---- | ------- | -------------------------------------------------------- |
| `p`  | uint8   | Protocol associated with the new market                  |
| `u`  | address | Underlying token associated with the new market          |
| `m`  | uint256 | Maturity timestamp of the new market                     |
| `c`  | address | Compounding Token address associated with the new market |
| `sw` | address | Address of the deployed swivel contract                  |
| `n`  | string  | Name of the new market zcToken                           |
| `s`  | string  | Symbol of the new market zcToken                         |
| `d`  | uint8   | Decimals of the new market zcToken                       |

#### setAdmin

Sets the admin

**Declaration**

```solidity
function setAdmin(
address a
) external authorized returns
(bool)
```

**Modifiers:**

| Modifier   |
| ---------- |
| authorized |

**Args:**

| Arg | Type    | Description            |
| --- | ------- | ---------------------- |
| `a` | address | Address of a new admin |

#### setMarketPlace

We only allow this to be set once

> there is no emit here as it's only done once post deploy by the deploying admin

**Declaration**

```solidity
function setMarketPlace(
address m
) external authorized returns
(bool)
```

**Modifiers:**

| Modifier   |
| ---------- |
| authorized |

**Args:**

| Arg | Type    | Description                                  |
| --- | ------- | -------------------------------------------- |
| `m` | address | Address of the deployed marketPlace contract |

### Events

#### SetAdmin

Emitted on a change of the admin


---

# Agent Instructions: 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:

```
GET https://docs.swivel.finance/swivel-v3.0.0/developers/contract/contracts/creator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
