Skip to main content

Vote.canExecute() method

Can Execute

Example

// The proposal ID of the proposal you want to check
const proposalId = "0";
const canExecute = await contract.canExecute(proposalId);
console.log(canExecute);

Signature:

canExecute(proposalId: string): Promise<boolean>;

Parameters

ParameterTypeDescription
proposalIdstringThe proposal ID to check.

Returns:

Promise<boolean>

  • True if the proposal can be executed, false otherwise.

Remarks

Check if a proposal can be executed (if the proposal has succeeded).