Loading

format_ether

Scalar function

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

format_ether(UINT256)

Parameters

NameType
weiUINT256

Returns

NameType
ethDECIMAL(38,18)
1
SELECT format_ether(32000000000000000000::uint256); -- 32 ETH
Notebook ready in readonly mode.

format_ether(INT256)

Parameters

NameType
weiINT256

Returns

NameType
ethDECIMAL(38,18)
1
SELECT format_ether(32000000000000000000::uint256); -- 32 ETH
Notebook ready in readonly mode.