getProposalVoteCounts

Get the info about Against, For and Abstain votes of a proposal

Example

import { getProposalVoteCounts } from "thirdweb/extensions/vote";
const data = await getProposalVoteCounts({ contract, proposalId });
// Example result
{
for: 12000000000000000000n, // 12 tokens (with a decimals of 18) were used to vote "for"
against: 7000000000000000000n, // 7 tokens (with a decimals of 18) were used to vote "against"
abstain: 0n, // no user has voted abstain on this proposal
}
function getProposalVoteCounts(
): Promise<ProposalVoteInfo>;

Parameters

Returns

let returnType: Promise<ProposalVoteInfo>;

the object containing the info about Against, For and Abstain votes of a proposal Note: the count is displayed in "wei"