1

Is it a wei, kwei, mwei, gwei, ... Something else?

The API doesn't say much.

Shane Fontaine
  • 18,036
  • 20
  • 54
  • 82
Damir Olejar
  • 828
  • 3
  • 11
  • 25

1 Answers1

2

The unit is wei.

Wei is the lowest possible denomination that can be handled by Solidity. Because of this, various values can be calculated (but not necessarily the other way around), such as ether, tx.gasprice, and even ERC20 tokens with arbitrary decimals.

Shane Fontaine
  • 18,036
  • 20
  • 54
  • 82
  • 1
    ERC20 tokens do not use decimals, there is no floating point system in solidity https://ethereum.stackexchange.com/questions/2987/how-can-i-represent-decimal-values-in-solidity/2990 – Fifth Dimension Dragon Mar 28 '21 at 16:29