Given a token, how do I determine the token's name, symbol, and logo?
1 Answer
SPL-Token's name, symbol, logo, and more can be retrieved today the following way:
- Get associated Metaplex Metadata Account to check for Metadata
- If no metadata exists, check legacy token-list from
@solana/spl-token-registry
This means that first priority should be Metaplex Metadata, then @solana/spl-token-registry
Solflare's Unified Token List does this automatically if you want to use their source code.
-
2the link above is for the token aggregator. Here's the link for the actual fetching of metadata github.com/solflare-wallet/utl-sdk– CactusCommented Jul 30, 2022 at 1:20