Denomination
-
‘amount’ is denominated in the smallest indivisible unit of the token. For ETH, the smallest indivisible unit is Wei (10^-18 ETH). For ERC-20s, the smallest unit is the unit returned from
function totalSupply() public view returns (uint256). -
‘decimals’ is the exponential value N that satisfies the equation
amount * 10^-N = standard_denomination. The standard denomination is the most commonly used denomination for the token.- In the case of the native gas token,
decimalsis defined via convention. As an example, for ETH of Ethereum mainnet, the standard denomination is 10^-18 the smallest denomination (Wei). As such, for ETH on Ethereum mainnet,decimalsis 18. - In the case of ERC-20 tokens,
decimalsis defined via configuration.decimalswill be the number returned byfunction decimals() public view returns (uint8)on the underlying token contract.
- In the case of the native gas token,