> For the complete documentation index, see [llms.txt](https://mars-protocol.gitbook.io/mars-protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mars-protocol.gitbook.io/mars-protocol/contracts-core/treasury.md).

# Treasury

The Treasury contract receives protocol fees that are kept in order to be spent in campaigns that are submitted and approved by the council.

## Links

* package (msgs and types): <https://github.com/mars-protocol/mars-core/blob/master/packages/mars-core/src/treasury.rs>
* contract:  <https://github.com/mars-protocol/mars-core/blob/master/contracts/mars-treasury/src/contract.rs>
* schema: <https://github.com/mars-protocol/mars-core/tree/master/contracts/mars-treasury/schema>

## Config

<table><thead><tr><th>Key</th><th width="200">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>owner</code></td><td>CanonicalAddr</td><td>Address of contract owner that can update config</td></tr></tbody></table>

## InstantiateMsg

{% tabs %}
{% tab title="Rust" %}

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct InstantiateMsg {
    pub owner: String
}
```

{% endtab %}

{% tab title="JSON" %}

```json
{
  "owner": "terra..."
}
```

{% endtab %}
{% endtabs %}

| Key     | Type   | Description                                      |
| ------- | ------ | ------------------------------------------------ |
| `owner` | String | Address of contract owner that can update config |

## ExecuteMsg

### `UpdateConfig`

Update contract config (only callable by owner).

{% tabs %}
{% tab title="Rust" %}

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    UpdateConfig {
        owner: Option<String>
    }
}
```

{% endtab %}

{% tab title="JSON" %}

```json
{
  "update_config": {
    "owner": "terra..."
  }
}
```

{% endtab %}
{% endtabs %}

| Key       |        |                                                  |
| --------- | ------ | ------------------------------------------------ |
| `owner`\* | String | Address of contract owner that can update config |

\* = optional

### `ExecuteCosmosMsg`

Execute Cosmos msg.

{% tabs %}
{% tab title="Rust" %}

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    ExecuteCosmosMsg(CosmosMsg)
}
```

{% endtab %}

{% tab title="JSON" %}

```json
{
  "execute_cosmos_msg": 
}
```

{% endtab %}
{% endtabs %}

## QueryMsg

### `Config`

Get contract config.

{% tabs %}
{% tab title="Rust" %}

```rust
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    Config {}
}
```

{% endtab %}

{% tab title="JSON" %}

```json
 {
  "config": {}
}
```

{% endtab %}
{% endtabs %}
