0

How can I revoke the mint authority of my SPL token using Anchor?

Using the Revoke accounts context seems not to make a difference.

Side note, what does source represent from anchor's SPL token helpers here

#[derive(Accounts)]
pub struct Revoke<'info> {
    pub source: AccountInfo<'info>,
    pub authority: AccountInfo<'info>,
}

2 Answers 2

2

Use the set_authority instruction. Then specify MintTokens as the authority type, and None as the new_authority

0

I was started learning rust and anchor framework try the below steps hope it will solve your problem

Define a structure (e.g., Revoke) that includes the accounts needed for the revocation, such as the source account and the mint authority account. Ensure the source account has permission to perform the revocation. Implement a function (e.g., revoke_authority) that takes a context with the Revoke structure. Inside the function, use the provided Anchor API to revoke the authority of the mint by setting it to None.

1
  • Is the source account the token account or the signer/authority which exists. Also, I don't think a revoke_aurhority method exists. Please check my question again.
    – Jimii
    Commented May 4 at 23:09

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.