building-magnifying-glassMetric builder 2 dapps example

1

Here you can find the Power Swap Treasury address.

2

Select any treasury swap transaction.

3

In the JSON, examine the state changes in the call result of the treasury dApp address. The balance_Waves key shows the amount of Waves entering the treasury through swaps.

In the same JSON, examine the state changes in the call result of the PWR issuer dApp address (3PHEK5eM2RTwnrhWMzNxsAPANMoxamFH1GX). The minted_by_3PQn4BwNW1kcX1gagVHWxSP5RyQ3V9UYPT8 key value shows how much PWR the treasury minted.

4

  • Add the dApp addresses one by one using the “Add New dApp” button.

  • Click “Fetch dApp Keys” to retrieve their keys.

  • Search within these keys for balance_Waves and minted_by_3PQn4BwNW1kcX1gagVHWxSP5RyQ3V9UYPT8.

  • Use “Get Dataset” to obtain the dataset.

  • Drag the items (array) boxes into the “drop keys here” field.

  • Create dataset headers.

  • Divide values by 10⁸.

  • Adjust the chart and data settings.

Preview the chart:

  • Enter the metric title, description, and creator information.

  • Use the “View in Community” button to see the metric.