4

Why do I get an error when I try to close a token address? spl-token close (token address)

Error: Account could not be parsed as token account: pubkey= (my Ledger address)

This is the same Ledger address I used to create the token.

I have used spl-token --accounts -v to verify that I have the correct token address and that all the tokens are burned.

So there are no tokens in the account address.

I use my Ledger with the CLI, and I do not get any verification on my Ledger when I use the spl-token close (token address) command.

Everything else works fine, I can create tokens, I can burn tokens, etc. then I get promoted on my Ledger to sign the transactions.

1 Answer 1

1

Great question.

Please note that spl-token close expects a different address on the command line than spl-token burn.

For spl-token burn, you specify the token account address, i.e. the associated token account address for your wallet.

However, spl-token close is asking for the token address, not the token account address. The token address is another name for the token mint here, sometimes also called token mint address.

When you do your spl-token accounts -v, you will see the token address(es) in the left hand side, and the token account addresses on the right hand side.

Use the values on the left for spl-token close, but the values on the right for spl-token burn.

Don't ask me why the Solana folks did it that way, though. I think that will remain their little dark secret forever... :-)

2
  • I know that... I have done what you describe... I use the left value... as you can see above I use the spl-token close (token address) I don't use spl-token close (account address) That's why it's strange I get this: Error: Account could not be parsed as token account: pubkey= (my Ledger address)
    – Kent-I B
    Commented Aug 22, 2022 at 12:07
  • Please post screenshots (black out keys if need to - but's just public keys anyway) Commented Aug 22, 2022 at 18:54

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.