1

I've got a problem. I can't send NFT in my JS code, or rather include in transaction token NFT account which has state - frozen. How can I unfreeze it? I've seen an example that I need to use Metaplex.

But can I add this to my main transaction, and then use already unfrozen token account and include it in TransferInstruction ? Or it's incorrect??

import { transferV1 } from '@metaplex-foundation/mpl-token-metadata'

let transaction = new solanaWeb3.Transaction();

const unfreeze = await transferV1(umi, {
  mint,
  authority: currentOwner,
  tokenOwner: currentOwner.publicKey,
  destinationOwner: newOwner.publicKey,
  tokenStandard: TokenStandard.NonFungible,
}).transaction.add(unfreeze)

Maybe Is there any other ways to unfreeze a token account? Thanks

2 Answers 2

1

Your token account is frozen, so you need to unfreeze it first before being able to transfer anything. For this you need to own the Keypair in charge of the FreezeAuthority and then use it to execute a ThawAccount instruction on your account. From the docs:

The Mint may also contain a freeze_authority which can be used to issue FreezeAccount instructions that will render an Account unusable. Token instructions that include a frozen account will fail until the Account is thawed using the ThawAccount instruction. The SetAuthority instruction can be used to change a Mint's freeze_authority. If a Mint's freeze_authority is set to None then account freezing and thawing is permanently disabled and all currently frozen accounts will also stay frozen permanently.

2
  • So without Keypair of the FreezeAuthority i can't do anything? So sad... Commented Feb 9 at 6:29
  • Yes, unfortunately that's the answer.
    – Ahri
    Commented Feb 9 at 8:01
0

You can use createThawAccountInstruction or thawAccount functions from token library to unfreeze your token account. But of course your keypair should have freeze authority.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.