Prepares a transaction to call the "castVote" function on the contract.
import { sendTransaction } from "thirdweb";import { castVote } from "thirdweb/extensions/vote"; const transaction = castVote({ contract, proposalId: ..., support: ..., overrides: { ... }}); // Send the transactionawait sendTransaction({ transaction, account });
function castVote( options: BaseTransactionOptions< CastVoteParams | { asyncParams: () => Promise<CastVoteParams> } >,): PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>;
The options for the "castVote" function.
let options: BaseTransactionOptions< CastVoteParams | { asyncParams: () => Promise<CastVoteParams> }>;
let returnType: PreparedTransaction< any, AbiFunction, PrepareTransactionOptions>;
A prepared transaction object.