execute

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

Example

import { execute } from "thirdweb/extensions/vote";
const transaction = execute({
contract,
targets: ...,
values: ...,
calldatas: ...,
descriptionHash: ...,
overrides: {
...
}
});
// Send the transaction
...
function execute(
ExecuteParams | { asyncParams: () => Promise<ExecuteParams> }
>,

Parameters

The options for the "execute" function.

Type

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

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.