Built-in action Built In

Convert a smallest-unit integer (e.g. '3750000') back to a human-readable decimal string (e.g. '3.75' for USDC with 6 decimals). Uses string math — no floating-point errors. Works for any ERC-20 token.

At a Glance

FieldValue
Action IDconvert-from-wei
CategoryBuilt In
ConnectorNot required
Requires gasNo
Funds movementNone declared
Tagsutility, transformer, wei, token, conversion, onchain

Payload Schema

FieldTypeRequiredDescription
weistringYesInteger string in smallest units (wei) to convert. Supports workflow variables like {{node.result.amount}}.
decimalsnumberYesNumber of decimals for the token. Common values: 6 (USDC, USDT), 8 (WBTC), 18 (ETH, most ERC-20).

Result Schema

FieldTypeRequiredDescription
valuestringYesHuman-readable decimal string. Trailing zeros are trimmed (e.g. '3.75' not '3.750000').

Examples

json
{ "type": "convert-from-wei", "payload": { "wei": "3750000", "decimals": 6 }, "children": []}

Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.

Ask a question... ⌘I