I am looking for a way to burn an NFT like phantom wallet allowing.(using solana-web3-npm) can any 1 direct me to an example/resource
1 Answer
https://solanacookbook.com/references/token.html#how-to-burn-tokens
let txhash = await burnChecked(
connection, // connection
feePayer, // payer
tokenAccountPubkey, // token account
mintPubkey, // mint
alice, // owner
1e8, // amount, if your deciamls is 8, 10^8 for 1 token
8
);
-
thank you! 2 questions, please. 1. how it can be implemented using a wallet adapter(since don't have keypair) 2. which version of @solana/spl-token ` burnChecked, createBurnCheckedInstruction` are available ?– AvaultoCommented Aug 30, 2022 at 15:56
-
i manage to init the transaction but it seems like i dont get back the "sol for rent" for the token account as it seems on: sol-incinerator.com why so?– AvaultoCommented Aug 30, 2022 at 18:34
-
For maximal SOL return you need to use metaplex token metadata program full burn. Commented Aug 31, 2022 at 8:28
-
thx ohad, can you send me an email where i can contract you?(discord/telegram) please? [email protected]– AvaultoCommented Aug 31, 2022 at 9:09