Macros: Stats Tables: Stats and Metrics - FlipsideCrypto/fsc-evm GitHub Wiki

The following macros are intended to be used to create and maintain the silver and gold traces models. These macros can be accessed via version >=v of the fsc-evm package. Macro variables are set and managed in the respective repo's dbt_project.yml file. Please see the fsc-evm installation instructions in the README for more details on how to access and utilize this macro effectively.

The Stats macros are used to create tables for the Stats pipeline, which enables users to easily analyze blockchain stats and reduces computational resources and requirements.


silver_stats_core_metrics_hourly

Usage

This macro creates a table that is used to calculate hourly core metrics for transactions, including counts of blocks and transactions, as well as fee totals. It is typically deployed in the silver layer.

fsc_evm.silver_stats_core_metrics_hourly

Parameters

Note: Parameters with default values must be ordered after non-default parameters.

This macro does not have any parameters.

Example

{{ fsc_evm.silver_stats_core_metrics_hourly() }}

stats_ez_core_metrics_hourly

Usage

This macro creates a table that aggregates core metrics from the silver layer and converts total fees into USD using the latest price data.

fsc_evm.stats_ez_core_metrics_hourly

Parameters

Note: Parameters with default values must be ordered after non-default parameters.

Parameter Type Default Description Variable
token_address String - The address of the token for which the price is being retrieved. This is essential for calculating the total fees in USD. STATS_TOKEN_ADDRESS

Example

{{ fsc_evm.stats_ez_core_metrics_hourly() }}