Home > @3rdweb/sdk > VoteModule > hasVoted
Check If Wallet Voted
Signature:
hasVoted(proposalId: string, account?: string): Promise<boolean>;
Parameter | Type | Description |
---|---|---|
proposalId | string | The unique identifier of a proposal . |
account | string | (optional) wallet account address. Defaults to connected signer. |
Returns:
Promise<boolean>
Check if a specified wallet has voted a specific proposal
// The proposal ID of the proposal you want to check
const proposalId = "0";
// The address of the wallet you want to check to see if they voted
const address = "";
await module.hasVoted(proposalId, address);