I'm a beginner, and I want to create a token(fungible) with metadata attached, but I found two ways to create tokens and I don't really understand how it works.
Hope everyone can answer. Thank you so much!
There are two paths you can take if your token mint belongs to token-22 program
Using the @solana/spl-token to create the token and add metadata via metadata pointer extension in TS, guide -> https://solana.com/developers/guides/token-extensions/metadata-pointer
Using Metaplex and the create helpers from Umi -> https://developers.metaplex.com/guides/javascript/how-to-create-a-solana-token
These are the easiest paths to follow, If you want to achieve this in a Rust program, check out the program examples in this repo -> https://github.com/solana-developers/program-examples/tree/main/tokens/token-2022