generateMintSignature

Generates the payload and signature for minting an ERC20 token.

Example

import {
mintWithSignature,
generateMintSignature,
} from "thirdweb/extensions/erc20";
const { payload, signature } = await generateMintSignature({
account,
contract,
mintRequest: {
to: "0x...",
quantity: "10",
},
});
const transaction = mintWithSignature({
contract,
payload,
signature,
});
await sendTransaction({ transaction, account });

Parameters

Returns

A promise that resolves to the payload and signature.