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

Add Optimism Tables to Dune Explorer UI #1429

Merged
merged 14 commits into from
Aug 26, 2022
41 changes: 41 additions & 0 deletions macros/alter_table_properties.sql
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,43 @@ ALTER TABLE airdrop_optimism.addresses SET TBLPROPERTIES ('dune.public'='true',
'dune.data_explorer.contributors'='["msilb7"]');
{% endset %}

{% set transfers_optimism_eth %}
ALTER TABLE transfers_optimism.eth SET TBLPROPERTIES ('dune.public'='true',
'dune.data_explorer.blockchains'='["optimism"]',
'dune.data_explorer.category'='abstraction',
'dune.data_explorer.abstraction.type'='sector',
'dune.data_explorer.abstraction.name'='transfers',
'dune.data_explorer.contributors'='["msilb7", "chuxinh"]');
{% endset %}

{% set uniswap_v3_optimism_pools %}
ALTER VIEW uniswap_v3_optimism.pools SET TBLPROPERTIES ('dune.public'='true',
'dune.data_explorer.blockchains'='["optimism"]',
'dune.data_explorer.category'='abstraction',
'dune.data_explorer.abstraction.type'='project',
'dune.data_explorer.abstraction.name'='uniswap_v3',
'dune.data_explorer.contributors'='["msilb7", "chuxinh"]');
{% endset %}

{% set tokens_optimism_nft %}
ALTER VIEW tokens_optimism.nft SET TBLPROPERTIES('dune.public'='true',
'dune.data_explorer.blockchains'='["optimism"]',
'dune.data_explorer.category'='abstraction',
'dune.data_explorer.abstraction.type'='sector',
'dune.data_explorer.abstraction.name'='tokens',
'dune.data_explorer.contributors'='["msilb7", "chuxinh"]');
{% endset %}

{% set tokens_optimism_erc20 %}
ALTER VIEW tokens_optimism.erc20 SET TBLPROPERTIES('dune.public'='true',
'dune.data_explorer.blockchains'='["optimism"]',
'dune.data_explorer.category'='abstraction',
'dune.data_explorer.abstraction.type'='sector',
'dune.data_explorer.abstraction.name'='tokens',
'dune.data_explorer.contributors'='["msilb7", "chuxinh"]');
{% endset %}


{% do run_query(balances_ethereum_erc20_day) %}
{% do run_query(balances_ethereum_erc20_hour) %}
{% do run_query(balances_ethereum_erc20_latest) %}
Expand Down Expand Up @@ -612,6 +649,10 @@ ALTER TABLE airdrop_optimism.addresses SET TBLPROPERTIES ('dune.public'='true',
{% do run_query(safe_ethereum_eth_transfers) %}
{% do run_query(prices_tokens) %}
{% do run_query(airdrop_optimism_addresses) %}
{% do run_query(transfers_optimism_eth) %}
{% do run_query(uniswap_v3_optimism_pools) %}
{% do run_query(tokens_optimism_nft) %}
{% do run_query(tokens_optimism_erc20) %}

{% do log("Tables generated", info=True) %}
{%- else -%}
Expand Down
2 changes: 1 addition & 1 deletion models/transfers/optimism/eth/transfers_optimism_eth.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{
config(
alias ='transfers_optimism_eth',
alias ='eth',
materialized ='incremental',
file_format ='delta',
incremental_strategy='merge',
Expand Down