setOwner

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

Example

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

Parameters

The options for the "setOwner" function.

Type

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

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.