I have been trying to freeze the token account by using freeze delegated account in an anchor program, but no matter what I try its not working. The latest update in my trial gives me 0x39. I can't figure out how to resolve this issue and run this function successfully.
-
please replace this screenshot with a code block– trent.solCommented Jul 26, 2022 at 18:06
-
please post the full error message with transaction logs– trent.solCommented Jul 26, 2022 at 18:07
-
Also, please provide more context, including the program and library that you're using.– Jon CCommented Jul 27, 2022 at 15:29
1 Answer
First there is a conceptual issue, why do you need to freeze the token in the holder wallet while he would be able to unfreeze it as being the one with the delegated_amount?
This is because the approved authority is owner
.
The second issue is that you are providing the token program in place of the NFT edition (master edition or edition in there) in the call to freeze_delegated_account
This is the line that is incorrect edition: ctx.accounts.token_program.key()
, it should be the edition PDA as
-
Hey, thanks for the response. What is the NFT Edition? and I am freezing the token in holder wallet just to make it work somehow, if I pass this case I ll move to the next case. Commented Aug 1, 2022 at 8:25
-
I edited my answer to accuratly describe why the line is wrong– ArowanaCommented Aug 1, 2022 at 21:48