canExecute

Simulate the execute method of the Vote contract, to check if you can execute a proposal

Example

import { canExecute } from "thirdweb/extensions/vote";
const executable = await canExecute({ contract, proposalId });
function canExecute(
options: BaseTransactionOptions<{ proposalId: bigint }>,
): Promise<boolean>;

Parameters

Type

let options: BaseTransactionOptions<{ proposalId: bigint }>;

Returns

let returnType: Promise<boolean>;

boolean - true if the proposal is executable, else false