I created a Solana token with a test wallet/account. Now I want to transfer authority to another account and delete the test one. Is there any way to do that?
Asked
Active
Viewed 3,765 times
1 Answers
2
You can do that through spl-token authorize
on the CLI, or the SetAuthority
instruction https://github.com/solana-labs/solana-program-library/blob/2d770628ef0fc05c22b36404cfd9aebd3b59c110/token/program/src/instruction.rs#L977
Note that it is an antipattern to transfer the ownership of an Associated Token Account: https://spl.solana.com/associated-token-account
In that case, the best practice is to create an associated token account for the recipient's wallet, transfer the tokens, and then close the first account.

Jon C
- 7,019
- 10
- 17
-
What if we want to transfer ownership like we offer our entire FT token (everything -- governance, ownership, website, artwork, token, everything) to a third-party on an NFT? Would we do it the Associated Token route or use the SetAuthority route? – Volomike Jan 21 '22 at 23:43
-
Only the token itself uses the associated token account, and the mint can be `authorize`d to someone else. As for the governance, depends on your model, but probably you just transfer the governance tokens, and then the rest can be done off-chain normally – Jon C Jan 22 '22 at 10:14
-
If I read you right, the minting account for the fungible token I created can be set to some other minting account using an authorize statement, correct? As in, selling my entire crypto to another org entirely and off my hands entirely. I was considering the NFT market with an NFT token to sell this FT token -- domain, artwork, minting authority, everything. – Volomike Jan 24 '22 at 04:23
-
I can't speak for "your entire crypto" since I'm not sure what that means, but yes, each individual mint can be `authorize`d to someone else, using `spl-token authorize ... mint ...` – Jon C Jan 24 '22 at 10:34