setVotingPeriod

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

Example

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

Parameters

The options for the "setVotingPeriod" function.

Type

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

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.