castVoteWithReason

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

Example

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

Parameters

The options for the "castVoteWithReason" function.

Type

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

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.