transferOwnership

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

Example

import { sendTransaction } from "thirdweb";
import { transferOwnership } from "thirdweb/extensions/modules";
const transaction = transferOwnership({
contract,
newOwner: ...,
overrides: {
...
}
});
// Send the transaction
await sendTransaction({ transaction, account });
function transferOwnership(
| { asyncParams: () => Promise<TransferOwnershipParams> }
>,

Parameters

The options for the "transferOwnership" function.

Type

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

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.