0

I'm from ETH coming to SOL. But I noticed in this article, the smart contract address (token program address) is this way - https://nimb.ws/sIxWM7

But here the address starts with the word "Token" like - https://nimb.ws/UT6PrM

So which is correct?

1 Answer 1

1

The one that starts Token is the Token program, which is a Solana program that can be used to create/mint/transfer/etc. SPL tokens.

The one in your first screenshot (and the one labeled 'Mint' in your second screenshot) is a particular token that has been created using that program. So they're different things, and I'm not too sure which you're asking for.

  • If you want to interact with a specific token, it's the one in your first screenshot
  • If you want to interact with the Token program, it's the one in your second screenshot
2
  • Could you explain, if I want to transfer 1 USDC to another wallet, which address should I use? I don't understand what "interact with a specific token" means. I thought tokens are all controlled by a token program (like USDC token is controlled by USDC token program) so our code just sends instructions to token program to send 1 USDC to someone. But here, do I talk to the USDC token itself?
    – ratib90486
    Commented Aug 9, 2022 at 5:02
  • You need to use the associated token account, which gives you a USDC address for yourself and for the recipient. See this cookbook example (view the full source code to see where the token accounts come from): solanacookbook.com/references/…
    – Callum M
    Commented Aug 9, 2022 at 9:23

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.