Wei, gwei, ether and custom decimals
Convert between wei, gwei and ether, or any token with custom decimals. Ethereum amounts are integers in wei, where 1 ether = 10^18 wei and 1 gwei = 10^9 wei. The conversion uses exact bigint math, never floating point, so no precision is lost.