burn

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

Example

import { sendTransaction } from "thirdweb";
import { burn } from "thirdweb/extensions/erc1155";
const transaction = burn({
contract,
account: ...,
id: ...,
value: ...,
overrides: {
...
}
});
// Send the transaction
await sendTransaction({ transaction, account });
function burn(
BurnParams | { asyncParams: () => Promise<BurnParams> }
>,

Parameters

The options for the "burn" function.

Type

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

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.