castVote

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

Example

import { castVote } from "thirdweb/extensions/vote";
const transaction = castVote({
contract,
proposalId: ...,
support: ...,
overrides: {
...
}
});
// Send the transaction
...
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.