Is there any way to get spl decimal in program? Sorry about this, this question is too short so I have to add this sentence.
If you are writing a program using Anchor, then you can do the following:
anchor_spl to get the
Then you can do this in the Accounts struct for your instruction, which deserialized the mint account data for you:
#[account(mut)] pub mint: Account<'info, Mint>,
Within your instruction you should then be able to access the decimals for the mint like this: