getAll

Get all proposals from a Vote contract with some extra info attached for each proposal (current state and votes)

Example

import { getAll } from "thirdweb/extension/getAll";
const allProposals = await getAll({ contract });
function getAll(
): Promise<Array<ProposalItem>>;

Parameters

Type

let options: { contract: ThirdwebContract<abi> } & T;

Returns

let returnType: {
description: string;
endBlock: bigint;
executions: Array<{
nativeTokenValue: bigint | undefined;
toAddress: string | undefined;
transactionData: Hex | undefined;
}>;
proposalId: bigint;
proposer: string;
startBlock: bigint;
state: number;
stateLabel: string | undefined;
votes: ProposalVoteInfo;
};

An array containing proposals data