Docs

approve

Approves the spending of tokens by a specific address.

Example

import { approve } from "thirdweb/extensions/erc20";
const tx = await approve({
contract,
spender: "0x...",
amount: 100,
});

Parameters

Returns

A prepared transaction object.