> For the complete documentation index, see [llms.txt](https://docs.gnoswap.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gnoswap.io/contracts/gov/governance/proposal_data.gno.md).

# proposal\_data.gno

{% embed url="<https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno>" %}

## Types

### CommunityPoolSpendInfo

```go
type CommunityPoolSpendInfo struct
```

CommunityPoolSpendInfo contains information for community pool spending proposals.

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L95)

#### Methods

**Amount**

```go
func (i *CommunityPoolSpendInfo) Amount() int64
```

#### Return Values

| Name    | Type  | Description                                   |
| ------- | ----- | --------------------------------------------- |
| `int64` | int64 | transfer amount in the token's smallest unit. |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L130)

**Clone**

```go
func (i *CommunityPoolSpendInfo) Clone() *CommunityPoolSpendInfo
```

Clone creates a deep copy of the CommunityPoolSpendInfo.

#### Return Values

| Name                      | Type                     | Description                                                   |
| ------------------------- | ------------------------ | ------------------------------------------------------------- |
| `*CommunityPoolSpendInfo` | \*CommunityPoolSpendInfo | independent spend-data copy, or nil when the receiver is nil. |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L219)

**To**

```go
func (i *CommunityPoolSpendInfo) To() address
```

Getter methods

#### Return Values

| Name      | Type    | Description                                                |
| --------- | ------- | ---------------------------------------------------------- |
| `address` | address | recipient address configured for the community-pool spend. |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L122)

**TokenPath**

```go
func (i *CommunityPoolSpendInfo) TokenPath() string
```

#### Return Values

| Name     | Type   | Description                                                    |
| -------- | ------ | -------------------------------------------------------------- |
| `string` | string | registered token path configured for the community-pool spend. |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L126)

#### Constructors

* `func GetProposalCommunityPoolSpendInfo(proposalID int64) (*CommunityPoolSpendInfo, error)` ([source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/getters.gno#L309))
* `func NewCommunityPoolSpendInfo(to address, tokenPath string, amount int64) *CommunityPoolSpendInfo` ([source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L110))

### ExecutionInfo

```go
type ExecutionInfo struct
```

ExecutionInfo contains information for parameter change execution. Messages are encoded strings that specify function calls and parameters.

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L134)

#### Methods

**Clone**

```go
func (i *ExecutionInfo) Clone() *ExecutionInfo
```

Clone creates a deep copy of the ExecutionInfo.

#### Return Values

| Name             | Type            | Description                                                                                        |
| ---------------- | --------------- | -------------------------------------------------------------------------------------------------- |
| `*ExecutionInfo` | \*ExecutionInfo | independent execution-data copy including a copied message slice, or nil when the receiver is nil. |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L234)

**Msgs**

```go
func (i *ExecutionInfo) Msgs() []string
```

#### Return Values

| Name       | Type      | Description                                           |
| ---------- | --------- | ----------------------------------------------------- |
| `[]string` | \[]string | encoded parameter-change messages in execution order. |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L162)

**Num**

```go
func (i *ExecutionInfo) Num() int64
```

Getter methods

#### Return Values

| Name    | Type  | Description                                   |
| ------- | ----- | --------------------------------------------- |
| `int64` | int64 | declared number of parameter-change messages. |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L158)

#### Constructors

* `func GetProposalExecutionInfo(proposalID int64) (*ExecutionInfo, error)` ([source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/getters.gno#L326))
* `func NewExecutionInfo(num int64, msgs []string) *ExecutionInfo` ([source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L147))

### ParameterChangeInfo

```go
type ParameterChangeInfo struct
```

ParameterChangeInfo represents a single parameter change to be executed.

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L165)

#### Methods

**Function**

```go
func (i *ParameterChangeInfo) Function() string
```

#### Return Values

| Name     | Type   | Description                                    |
| -------- | ------ | ---------------------------------------------- |
| `string` | string | function name of the parameter-change handler. |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L196)

**Params**

```go
func (i *ParameterChangeInfo) Params() []string
```

#### Return Values

| Name       | Type      | Description                                               |
| ---------- | --------- | --------------------------------------------------------- |
| `[]string` | \[]string | encoded arguments passed to the parameter-change handler. |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L200)

**PkgPath**

```go
func (i *ParameterChangeInfo) PkgPath() string
```

Getter methods

#### Return Values

| Name     | Type   | Description                                   |
| -------- | ------ | --------------------------------------------- |
| `string` | string | package path of the parameter-change handler. |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L192)

#### Constructors

* `func NewParameterChangeInfo(pkgPath string, function string, params []string) ParameterChangeInfo` ([source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L180))

### ProposalData

```go
type ProposalData struct
```

ProposalData contains the type-specific data for a proposal. This structure holds different data depending on the proposal type.

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L47)

#### Methods

**Clone**

```go
func (p *ProposalData) Clone() *ProposalData
```

Clone creates a deep copy of the ProposalData.

#### Return Values

| Name            | Type           | Description                                                                                |
| --------------- | -------------- | ------------------------------------------------------------------------------------------ |
| `*ProposalData` | \*ProposalData | independent proposal-data copy with cloned nested values, or nil when the receiver is nil. |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L251)

**CommunityPoolSpend**

```go
func (p *ProposalData) CommunityPoolSpend() *CommunityPoolSpendInfo
```

CommunityPoolSpend returns the community pool spending information.

#### Return Values

| Name                      | Type                     | Description                     |
| ------------------------- | ------------------------ | ------------------------------- |
| `*CommunityPoolSpendInfo` | \*CommunityPoolSpendInfo | community pool spending details |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L65)

**Execution**

```go
func (p *ProposalData) Execution() *ExecutionInfo
```

Execution returns the execution information for parameter changes.

#### Return Values

| Name             | Type            | Description                        |
| ---------------- | --------------- | ---------------------------------- |
| `*ExecutionInfo` | \*ExecutionInfo | parameter change execution details |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L73)

**ProposalType**

```go
func (p *ProposalData) ProposalType() ProposalType
```

ProposalType returns the type of this proposal.

#### Return Values

| Name           | Type         | Description       |
| -------------- | ------------ | ----------------- |
| `ProposalType` | ProposalType | the proposal type |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L57)

#### Constructors

* `func NewProposalData(proposalType ProposalType, communityPoolSpend *CommunityPoolSpendInfo, execution *ExecutionInfo) *ProposalData` ([source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L86))

### ProposalMetadata

```go
type ProposalMetadata struct
```

ProposalMetadata contains descriptive information about a proposal. This includes the title and description that are displayed to voters.

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L9)

#### Methods

**Clone**

```go
func (p *ProposalMetadata) Clone() *ProposalMetadata
```

Clone creates a deep copy of the ProposalMetadata.

#### Return Values

| Name                | Type               | Description                                                 |
| ------------------- | ------------------ | ----------------------------------------------------------- |
| `*ProposalMetadata` | \*ProposalMetadata | independent metadata copy, or nil when the receiver is nil. |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L205)

**Description**

```go
func (p *ProposalMetadata) Description() string
```

Description returns the proposal description.

#### Return Values

| Name     | Type   | Description          |
| -------- | ------ | -------------------- |
| `string` | string | proposal description |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L26)

**Title**

```go
func (p *ProposalMetadata) Title() string
```

Title returns the proposal title.

#### Return Values

| Name     | Type   | Description    |
| -------- | ------ | -------------- |
| `string` | string | proposal title |

[source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L18)

#### Constructors

* `func NewProposalMetadata(title string, description string) *ProposalMetadata` ([source](https://github.com/gnoswap-labs/gnoswap/blob/d9d34bd345a36c3eedaccf491c6615b0ac4168cd/contract/r/gnoswap/gov/governance/proposal_data.gno#L38))
