> ## Documentation Index
> Fetch the complete documentation index at: https://docs.darkpool.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Predict Scripts

> create-predict-manager, fund-manager, supply-plp, predict-mint-smoke.

## `create-predict-manager`

Calls `predict::create_manager` against the live Predict package. Predict shares the manager internally; the script picks the new `PredictManager` id from `objectChanges` and prints it.

```bash theme={"system"}
pnpm predict:new-manager --execute
```

Paste the id into `.env` as `AGENT_PREDICT_MANAGER_ID`.

## `fund-manager`

Splits a DUSDC coin from the wallet and calls `predict_manager::deposit<T>` to fund the PredictManager's internal balance. Required before mint.

```bash theme={"system"}
pnpm predict:fund --amount 100 --execute
```

**Flags**

| Flag        | Required | Description                         |
| ----------- | -------- | ----------------------------------- |
| `--amount`  | yes      | Whole DUSDC amount                  |
| `--manager` | no       | Override `AGENT_PREDICT_MANAGER_ID` |
| `--execute` | no       | Sign + submit                       |

## `supply-plp`

Splits a DUSDC coin and calls `predict::supply<T>(predict, coin, clock, ctx) -> Coin<PLP>`, plus a `predict_facade::attribute_plp_supply` event so the indexer credits the supply.

```bash theme={"system"}
pnpm plp:supply --amount 50 --execute
```

Receives `Coin<PLP>` representing your share of the Predict shared vault.

## `predict-mint-smoke`

Builds a `predict::mint<T>` PTB with inline `market_key::new` against testnet using `AGENT_KEY` + `AGENT_PREDICT_MANAGER_ID`. Prerequisite: `fund-manager` deposited DUSDC first.

```bash theme={"system"}
pnpm smoke:mint --oracle-svi 0x... --execute
```

**Flags**

| Flag           | Required | Description                                            |
| -------------- | -------- | ------------------------------------------------------ |
| `--oracle-svi` | yes      | OracleSVI id (per asset/expiry)                        |
| `--strike`     | no       | Strike in whole units (default: nearest \$500 to spot) |
| `--side`       | no       | `up` or `down` (default: up)                           |
| `--amount`     | no       | DUSDC spend (default: 2)                               |
| `--execute`    | no       | Sign + submit                                          |

Used during bootstrap (SETUP step 7) to validate the Predict integration end-to-end.
