Every time when I start my parachain, I see Bob, Charlie, Dave,... etc and each of them has 1.1529 MUNIT
on Polkadot.js.org's Accounts -> Accounts -> My Account page. But how does Polkadot.js.org know my parachain's decimal places?
What does the M
mean? like 1 Million with 6 zeros?
After sending 100000000000000000
with 17 zeros as the value from one account to another, finally that shows up on that above Accounts page as 0.1MUNIT
.
Assume M
means 6 zeros, then 12 = 18 - 6... The Accounts page shows balance with 12 decimal places... where did that come from?
After some digging, I found those inside the chain_spec.rs
pub fn development_config() ...
properties.insert("tokenDecimals".into(), 12.into());
pub fn local_testnet_config() ...
properties.insert("tokenDecimals".into(), 12.into());
So the 12 dp must come from there... right? That is how Polkadot.js.org set its decimal places in the Accounts page. Right?
https://polkadot.js.org/apps/?rpc=ws%3A%2F%2Flocalhost%3A8844#