castVote

Prepares a transaction to call the "castVote" function on the contract.

Example

import { sendTransaction } from "thirdweb";
import { castVote } from "thirdweb/extensions/vote";
const transaction = castVote({
contract,
proposalId: ...,
support: ...,
overrides: {
...
}
});
// Send the transaction
await sendTransaction({ transaction, account });
function castVote(
CastVoteParams | { asyncParams: () => Promise<CastVoteParams> }
>,

Parameters

The options for the "castVote" function.

Type

CastVoteParams | { asyncParams: () => Promise<CastVoteParams> }
>;

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.