solui
  • Getting Started
  • Docs
  • Github
  • Twitter
  • Telegram

Outputs

Outputs specify results to display to the user once panel has succesfully executed. If no outputs are defined then the Dapp will not display any results but will simply show a success status.

Outputs

Structure

{
  ...,
  "panels": [
    {
      ...,
      "execs": [ ... ],
      "outputs": [
        {
          "title": "...",
          "type": "...",
          "value": "...",
          "scale": "...",
          "unit": "...",
        },
        ...
      ]
    }
  ]
}

Note that outputs are only displayed once all Execution steps have been completed.

## Reference

type

The output type. This is to help the renderer figure out how best to display the output value. At present this must be one of:

  • address
  • bool
  • bytes32
  • int
  • string

Example:

{
  "type": "string"
}

title

The user-friendly label for this output value.

Example:

{
  "title": "Balance"
}

value

The value to display, specified as one of:

Examples:

{
  "value": "@input[tokenSymbol]"
}
{
  "value": "A fixed value"
}

scale (optional)

Applies to type: int

This is how to much to scale the output value by to obtain the displayable value. This means multiplying the input value by 10^scale to obtain the real value.

For example, if outputting an ETH value (which gets returned as WEI from a contract call) then the scale should be set to -18.

Example:

{
  "scale": "-18"
}

If a scale is set then the output value becomes clickable such that the user is able to cycle through the different formats (both scaled and unscaled):

Output value

unit (optional)

Applies to type: int

This is user-friendly text that gets shown next to the output value when the scale property is also set.

Example:

{
  "unit": "Tokens"
}