I wonder how to freeze token account with update authority. (I don't have freeze authority. The MasterEdition has freeze authority, I think. I know that only freeze authority can freeze token account, but how can I use master edition account?) This is my code.
export const freezeAccount = async (nftMintAccount : PublicKey, tokenAccount : PublicKey) => {
const tokenAccountOwner = loadWalletKey(keyfile_tokenAccountOwner);
const authority = loadWalletKey(keyfile);
const token = new Token(solConnection, nftMintAccount, TOKEN_PROGRAM_ID, authority);
let result = await token.freezeAccount(tokenAccount, tokenAccountOwner, []);
}
- authority: nftMintAccount's update authority keypair (nftMintAccount's mint & freeze authority is MasterEdition now. but how can I use it to freeze account?)
- tokenAccountOwner: owner of tokenAccount
- tokenAccount: nftMintAccount's tokenAccount which is owned by tokenAccountOwner
The result says:
Program log: Instruction: FreezeAccount
Program log: Error: owner does not match
but I checked authority and tokenAccountOwner several times. They were sure. but what's the matter? whose owner dismatches? Please help me.