The Bank Module and subsequent Coin type contain metadata capabilities that include decimals as outlined in ADR-024-coin-metadata.
The relevant types are as follows:
message DenomUnit {
string denom = 1;
uint32 exponent = 2;
repeated string aliases = 3;
}
message Metadata {
string description = 1;
repeated DenomUnit denom_units = 2;
string base = 3;
string display = 4;
}
And the example of the $ATOM, which has 6 decimals, is given here:
{
"description": "The native staking token of the Cosmos Hub.",
"denom_units": [
{
"denom": "uatom",
"exponent": 0,
"aliases": [
"microatom"
],
},
{
"denom": "matom",
"exponent": 3,
"aliases": [
"milliatom"
]
},
{
"denom": "atom",
"exponent": 6,
}
],
"base": "uatom",
"display": "atom",
}