getAllProposals

Calls the "getAllProposals" function on the contract.

Example

import { getAllProposals } from "thirdweb/extensions/vote";
const result = await getAllProposals({
contract,
});
function getAllProposals(options: BaseTransactionOptions) : Promise<readonly Array<{ calldatas: readonly Array<`0x${string}`>; description: string; endBlock: bigint; proposalId: bigint; proposer: string; signatures: readonly Array<string>; startBlock: bigint; targets: readonly Array<string>; values: readonly Array<bigint> }>>

Parameters

The options for the getAllProposals function.

Type

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

Returns

let returnType: Promise<readonly Array<{ calldatas: readonly Array<`0x${string}`>; description: string; endBlock: bigint; proposalId: bigint; proposer: string; signatures: readonly Array<string>; startBlock: bigint; targets: readonly Array<string>; values: readonly Array<bigint> }>>

The parsed result of the function call.