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

# Proposal Account

## Overview

Proposals handle consensus for a given transaction, mapped one-to-one. Without a proposal account for a transaction, it cannot be voted on and subsequently executed.

Proposals store the status of consensus and tallies for approvals and rejections.

## Quick Example

```typescript theme={null}
import * as multisig from "@sqds/multisig";
import { PublicKey } from "@solana/web3.js";

const { Proposal } = multisig.accounts;

const [proposalPda] = multisig.getProposalPda({
  multisigPda,
  transactionIndex: BigInt(1),
});

const proposalAccount = await Proposal.fromAccountAddress(
  connection,
  proposalPda
);

console.log("Proposal Status", proposalAccount.status);
```

## PDA Derivation

A proposal account is derived with these seeds:

```
["multisig", multisig_key (as buffer), "transaction", transaction_index, "proposal"]
```

## Full Example

```typescript theme={null}
import * as multisig from "@sqds/multisig";

const { Proposal } = multisig.accounts;

async function main() {
    // Public Key of the Multisig PDA
    const multisigPda = new PublicKey("MyAmazingMultisig");

    // Fetch the deserialized Multisig account
    const multisigInfo = await multisig.accounts.Multisig.fromAccountAddress(
      connection,
      multisigPda
    );

    // Get the current transaction index
    const currentTransactionIndex = Number(multisigInfo.transactionIndex);
    const transactionIndex = BigInt(currentTransactionIndex + 1);
    // or, if this is your first transaction
    // const transactionIndex = 1n;

    // Bump is generally not needed
    const [proposalPda, proposalBump] = multisig.getProposalPda({
        multisigPda,
        transactionIndex,
    });

    const proposalAccount = await Proposal.fromAccountAddress(
        connection,
        proposalPda
    );

    // Log the proposal status
    console.log("Proposal Status", proposalAccount.status);
}
```

## Account Fields

| Field | Type | Description |
| - | - | - |
| `multisig` | `Pubkey` | The multisig this belongs to |
| `transactionIndex` | `u64` | Index of the associated transaction |
| `status` | `ProposalStatus` | Current status of the transaction |
| `bump` | `u8` | PDA bump |
| `approved` | `Vec<Pubkey>` | Keys that have approved |
| `rejected` | `Vec<Pubkey>` | Keys that have rejected |
| `cancelled` | `Vec<Pubkey>` | Keys that have cancelled (Approved only) |

## Proposal Status

| Status | Description |
| - | - |
| `Draft` | Proposal created but not yet active (for batches) |
| `Active` | Proposal is open for voting |
| `Approved` | Threshold met, ready for execution |
| `Rejected` | Rejection threshold met |
| `Cancelled` | Proposal has been cancelled |
| `Executed` | Transaction has been executed |

## See Also

* [Create Proposal](/developers/typescript-sdk/instructions/create-proposal)
* [Approve Proposal](/developers/typescript-sdk/instructions/approve-proposal)
* [Reference: Proposal](/developers/reference/accounts#proposal)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.