delegate

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

Example

import { sendTransaction } from "thirdweb";
import { delegate } from "thirdweb/extensions/erc20";
const transaction = delegate({
contract,
delegatee: ...,
overrides: {
...
}
});
// Send the transaction
await sendTransaction({ transaction, account });
function delegate(
DelegateParams | { asyncParams: () => Promise<DelegateParams> }
>,

Parameters

The options for the "delegate" function.

Type

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

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.