<!-- AUTO-GENERATED by scripts/generate-cli-docs.ts — do not edit. Regenerate: yarn docs:gen -->

# pop treasury

Treasury & distributions

## pop treasury view

View treasury overview

```text
pop treasury view [flags]
```

## pop treasury balance

Show token holdings

```text
pop treasury balance [flags]
```

## pop treasury deposit

Deposit ERC20 tokens to treasury

```text
pop treasury deposit [flags]
```

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--amount` | number | yes | - | Amount to deposit (human token units) |
| `--token` | string | yes | - | ERC20 token address |

## pop treasury propose-swap

Propose a token swap via governance vote

```text
pop treasury propose-swap [flags]
```

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--amount` | number | yes | - | Amount to swap (human units of from-token) |
| `--duration` | number | no | `1440` | Vote duration in minutes |
| `--from-index` | number | yes | - | Curve coin index for from-token (0 or 1) |
| `--from-token` | string | yes | - | Token to sell (address) |
| `--min-out` | number | no | - | Minimum output amount in to-token units (default: 95% of the pool quote) |
| `--pool` | string | yes | - | Curve pool address |
| `--to-index` | number | yes | - | Curve coin index for to-token (0 or 1) |
| `--to-token` | string | yes | - | Token to receive (address) |

## pop treasury claim

Claim from a distribution with a manual amount + proof (prefer claim-mine)

```text
pop treasury claim [flags]
```

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--amount` | string | yes | - | Your allocated amount in TOKEN UNITS (e.g. 12.5) — must match the merkle leaf exactly; use --wei for the raw integer |
| `--distribution` | number | yes | - | Distribution ID |
| `--proof` | string | no | - | JSON array of merkle proof bytes32 hashes |
| `--proof-file` | string | no | - | Path to a JSON file with the proof array (or an allocation object with a "proof" field, as in merkle-distribution.json) |
| `--wei` | boolean | no | `false` | Treat --amount as the raw integer (wei-level) value instead of decimal token units |

## pop treasury distributions

List distributions with finalized/finalizable state

```text
pop treasury distributions [flags]
```

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--status` | string | no | - | Filter by status (choices: `Active`, `Finalized`) |

## pop treasury opt-out

Opt out of distributions

```text
pop treasury opt-out [flags]
```

## pop treasury opt-in

Opt back into distributions

```text
pop treasury opt-in [flags]
```

## pop treasury compute-merkle

Compute merkle tree for PT-based distribution

```text
pop treasury compute-merkle [flags]
```

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--amount` | string | yes | - | Total distribution amount (in token units, e.g. "40" for 40 BREAD) |
| `--output` | string | no | `merkle-distribution.json` | Output file for proofs |
| `--token` | string | yes | - | Payout token address |

## pop treasury propose-distribution

Propose a distribution via governance vote

```text
pop treasury propose-distribution [flags]
```

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--duration` | number | no | `1440` | Vote duration in minutes |
| `--merkle-file` | string | yes | - | Path to merkle-distribution.json from compute-merkle |

## pop treasury claim-mine

Auto-claim from all unclaimed distributions (recommended claim path)

```text
pop treasury claim-mine [flags]
```

## pop treasury send

Propose a transfer from Executor via governance

```text
pop treasury send [flags]
```

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--amount` | number | no | - | Amount to send (single recipient) |
| `--duration` | number | no | `60` | Vote duration in minutes |
| `--recipients` | string | no | - | JSON array for batch: [{"to":"0x...","amount":5},...] (max 8) |
| `--to` | string | no | - | Recipient address (single recipient) |
| `--token` | string | no | `native` | Token address or "native" for the chain's gas token |

## pop treasury propose-sdai

Propose depositing xDAI into sDAI for yield

```text
pop treasury propose-sdai [flags]
```

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--amount` | number | yes | - | xDAI amount to deposit into sDAI |
| `--duration` | number | no | `60` | Vote duration in minutes |

## pop treasury propose-finalize

Propose closing a distribution via governance (returns unclaimed funds to the treasury)

```text
pop treasury propose-finalize [flags]
```

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--distribution` | number | yes | - | Distribution ID to finalize |
| `--duration` | number | no | `60` | Vote duration in minutes |
| `--min-claim-blocks` | number | no | `0` | On-chain guard: execution reverts until this many blocks have passed since the distribution's CHECKPOINT block (0 = no extra guard beyond the vote duration) |

_Global flags: --org, --chain, --rpc, --json, --address, --private-key, --dry-run, --yes, --verbose, --quiet, --preflight (see [index.md](index.md))_
