approve

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

Example

import { approve } from "thirdweb/extensions/erc721";
const transaction = approve({
contract,
to: ...,
tokenId: ...,
overrides: {
...
}
});
// Send the transaction
...

Parameters

Returns

A prepared transaction object.