Skip to main content

Signature

Description

Converts uiAmount to its raw token representation at the effective multiplier. Part of the ERC-8056 optional Conversion extension (IScaledUIAmountConversion, interface ID 0x57854fc3). The inverse operation is toUIAmount(rawAmount). Integer division truncates toward zero, so the round-trip fromUIAmount(toUIAmount(x)) may return a value less than x by up to 1 wei when the multiplier does not evenly divide the amount.

Parameters

Returns

  • toUIAmount — the forward (raw → UI) converter.
  • toRawBalance — deprecated alias with identical behavior; retained in IB20Asset for backward compatibility.