> For the complete documentation index, see [llms.txt](https://docs.zestprotocol.com/start/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zestprotocol.com/start/stacks-market-v2-smart-contracts-overview/v2-contracts/dao-contracts/dao-traits.md).

# DAO Traits

{% hint style="info" %}
Purpose: Interface definitions for DAO system contracts. Defines traits for upgradable contracts and proposal scripts.
{% endhint %}

## Traits Defined

### upgradable

Interface for upgradable contracts. Used by dao-executor.

Functions:

{% code title="upgradable trait" %}

```
get-impl : () -> (response (optional principal) uint)
  - Get current implementation

set-impl : (principal) -> (response bool uint)
  - Set new implementation

init : (principal) -> (response bool uint)
  - Initialize with implementation
```

{% endcode %}

***

### proposal-script

Interface for DAO proposal contracts. All proposals must implement this trait.

Functions:

{% code title="proposal-script trait" %}

```
execute : () -> (response bool uint)
  - Execute proposal logic
```

{% endcode %}

## Usage

Contracts implementing these traits can interact with the DAO system:

* upgradable: Implemented by dao-executor for implementation management
* proposal-script: Implemented by all proposal contracts for execution by dao-executor


---

# 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.zestprotocol.com/start/stacks-market-v2-smart-contracts-overview/v2-contracts/dao-contracts/dao-traits.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.
