> For the complete documentation index, see [llms.txt](https://docs.swivel.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.swivel.finance/developers/contract/contracts/creator.md).

# 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
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.swivel.finance/developers/contract/contracts/creator.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.
