Loading

format_ether

Scalar function

Human-readable helper for wei balances. Equivalent to format_units(amount, 18).

format_ether(UINT256)

Parameters

Name Type
wei UINT256

Returns

Name Type
eth DECIMAL(38,18)
1
SELECT format_ether(32000000000000000000::uint256); -- 32 ETH
Notebook ready in readonly mode.

format_ether(INT256)

Parameters

Name Type
wei INT256

Returns

Name Type
eth DECIMAL(38,18)
1
SELECT format_ether(32000000000000000000::uint256); -- 32 ETH
Notebook ready in readonly mode.