Skip to content

Commit

Permalink
Customer 911: updating tables to fix issue with near and tron (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
SebMelendez01 authored Sep 6, 2024
1 parent fe10cc2 commit 0b95478
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions macros/metrics/get_p2p_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
date
, p2p_native_transfer_volume
, p2p_token_transfer_volume
, p2p_stablecoin_transfer_volume
, p2p_transfer_volume
from {{ ref("fact_" ~ chain ~ "_p2p_transfer_volume") }}
{% endmacro %}
4 changes: 2 additions & 2 deletions models/projects/arbitrum/core/ez_arbitrum_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ select
p2p_stablecoin_txns,
p2p_stablecoin_dau,
p2p_stablecoin_mau,
p2p_stablecoin_transfer_volume,
stablecoin_data.p2p_stablecoin_transfer_volume,
nft_trading_volume,
p2p_native_transfer_volume,
p2p_token_transfer_volume,
p2p_transfer_volume,
coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume,
coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(stablecoin_data.p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume,
coalesce(dex_volumes, 0) + coalesce(nft_trading_volume, 0) + coalesce(p2p_transfer_volume, 0) as settlement_volume
from fundamental_data
left join price_data on fundamental_data.date = price_data.date
Expand Down
4 changes: 2 additions & 2 deletions models/projects/avalanche/core/ez_avalanche_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ select
p2p_stablecoin_txns,
p2p_stablecoin_dau,
p2p_stablecoin_mau,
p2p_stablecoin_transfer_volume,
stablecoin_data.p2p_stablecoin_transfer_volume,
total_staked_native,
total_staked_usd,
issuance,
nft_trading_volume,
p2p_native_transfer_volume,
p2p_token_transfer_volume,
p2p_transfer_volume,
coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume,
coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(stablecoin_data.p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume,
coalesce(dex_volumes, 0) + coalesce(nft_trading_volume, 0) + coalesce(p2p_transfer_volume, 0) as settlement_volume
from staking_data
left join fundamental_data on staking_data.date = fundamental_data.date
Expand Down
4 changes: 2 additions & 2 deletions models/projects/base/core/ez_base_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ select
p2p_stablecoin_txns,
p2p_stablecoin_dau,
p2p_stablecoin_mau,
p2p_stablecoin_transfer_volume,
stablecoin_data.p2p_stablecoin_transfer_volume,
nft_trading_volume,
p2p_native_transfer_volume,
p2p_token_transfer_volume,
p2p_transfer_volume,
coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume,
coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(stablecoin_data.p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume,
coalesce(dex_volumes, 0) + coalesce(nft_trading_volume, 0) + coalesce(p2p_transfer_volume, 0) as settlement_volume
from fundamental_data
left join defillama_data on fundamental_data.date = defillama_data.date
Expand Down
4 changes: 2 additions & 2 deletions models/projects/ethereum/core/ez_ethereum_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ select
p2p_stablecoin_txns,
p2p_stablecoin_dau,
p2p_stablecoin_mau,
p2p_stablecoin_transfer_volume,
stablecoin_data.p2p_stablecoin_transfer_volume,

censored_blocks,
semi_censored_blocks,
Expand All @@ -103,7 +103,7 @@ select
p2p_native_transfer_volume,
p2p_token_transfer_volume,
p2p_transfer_volume,
coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume,
coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(stablecoin_data.p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume,
coalesce(dex_volumes, 0) + coalesce(nft_trading_volume, 0) + coalesce(p2p_transfer_volume, 0) as settlement_volume,
blob_fees_native,
blob_fees,
Expand Down
4 changes: 2 additions & 2 deletions models/projects/optimism/core/ez_optimism_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ select
p2p_stablecoin_txns,
p2p_stablecoin_dau,
p2p_stablecoin_mau,
p2p_stablecoin_transfer_volume,
stablecoin_data.p2p_stablecoin_transfer_volume,
nft_trading_volume,
p2p_native_transfer_volume,
p2p_token_transfer_volume,
p2p_transfer_volume,
coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume,
coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(stablecoin_data.p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume,
coalesce(dex_volumes, 0) + coalesce(nft_trading_volume, 0) + coalesce(p2p_transfer_volume, 0) as settlement_volume
from fundamental_data
left join price_data on fundamental_data.date = price_data.date
Expand Down
4 changes: 2 additions & 2 deletions models/projects/polygon/core/ez_polygon_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ select
p2p_stablecoin_txns,
p2p_stablecoin_dau,
p2p_stablecoin_mau,
p2p_stablecoin_transfer_volume,
stablecoin_data.p2p_stablecoin_transfer_volume,
nft_trading_volume,
p2p_native_transfer_volume,
p2p_token_transfer_volume,
p2p_transfer_volume,
coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume,
coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(stablecoin_data.p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume,
coalesce(dex_volumes, 0) + coalesce(nft_trading_volume, 0) + coalesce(p2p_transfer_volume, 0) as settlement_volume
from fundamental_data
left join price_data on fundamental_data.date = price_data.date
Expand Down
2 changes: 1 addition & 1 deletion models/projects/solana/core/ez_solana_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ select
p2p_stablecoin_txns,
p2p_stablecoin_dau,
p2p_stablecoin_mau,
p2p_stablecoin_transfer_volume,
stablecoin_data.p2p_stablecoin_transfer_volume,
total_staked_native,
total_staked_usd,
issuance,
Expand Down
4 changes: 2 additions & 2 deletions models/projects/tron/core/ez_tron_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ select
p2p_stablecoin_txns,
p2p_stablecoin_dau,
p2p_stablecoin_mau,
p2p_stablecoin_transfer_volume,
stablecoin_data.p2p_stablecoin_transfer_volume,
p2p_native_transfer_volume,
p2p_token_transfer_volume,
p2p_transfer_volume,
coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume,
coalesce(artemis_stablecoin_transfer_volume, 0) - coalesce(stablecoin_data.p2p_stablecoin_transfer_volume, 0) as non_p2p_stablecoin_transfer_volume,
coalesce(dex_volumes, 0) + coalesce(p2p_transfer_volume, 0) as settlement_volume
from fundamental_data
left join price_data on fundamental_data.date = price_data.date
Expand Down
2 changes: 1 addition & 1 deletion models/staging/tron/fact_tron_p2p_token_transfers.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
)
}}

{{ filter_p2p_token_transfers("tron", blacklist=('TAFjULxiVgT4qWk6UZwjqwZXTSaGaqnVp4', 'TSSMHYeV2uE9qYH95DqyoCuNCzEL1NvU3S')) }}
{{ filter_p2p_token_transfers("tron", blacklist=('TAFjULxiVgT4qWk6UZwjqwZXTSaGaqnVp4', 'TSSMHYeV2uE9qYH95DqyoCuNCzEL1NvU3S', 'TR95WcjR78Y4puyv8BkbFuxaf4WcvmmPpd')) }}

0 comments on commit 0b95478

Please sign in to comment.