Contract Logs
Last updated
Last updated
Similar to the Custom Table element, Contract Logs is up there with the most customisable and powerful elements within parsec.
At a high level it allows the event logs and their topics from any arbitrary contract to be visualised, as such the possibilities are endless and are only bounded by a user's curiosity and creativity!
The element allows us to customise axis, add multiple sources, perform transformations on sources, combine sources, add filters to topics, perform group by operations and plenty more. It has a relatively steep learning curve but once mastered it is a very powerful tool.
Here are some examples of how we might use the element:
To visualise the mints and burns of a Stablecoin:
Here we take the contract address of the Stablecoin in question and visualise transfers from and to the Burn address which represent mints and burns respectively. To create the visualisation we perform a simple transformation on the burn data source (*-1) and combine the 2 sources on 1 chart.
To look at liquidations on a decentralised perpetuals venue such as GMX:
Here we take the relevant contract address and select the LiquidatePosition event log grouping by indexToken and using a stacked bar visualisation to display the chart.
To look at inflows or compare the inflows of projects we are interested in:
Here we simply take the relevant contracts from each protocol and visualise the deposit logs from each, combining the data sources to create the visualisation.