Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customer 911: updating tables to fix issue with near and tron #471

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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')) }}
Loading