Skip to content

Commit

Permalink
change to one blockchain directory
Browse files Browse the repository at this point in the history
  • Loading branch information
0xBoxer committed Jan 22, 2025
1 parent f034eb4 commit 06c2281
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ FROM TABLE (
SELECT block_number,
block_time,
block_date,
date_trunc('month', block_date) as block_month,
block_hash,
contract_address,
topic0,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% macro uniswap_exposed_blockchains_list() %}
{{ return([
"gnosis"
, "optimism"
, "zkevm"
, "zksync"
, "zora"
]) }}
{% endmacro %}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ WITH evt_swap AS (
, amount1
, contract_address
, tx_hash
, tx_index
, evt_index
, tx_from
, tx_to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,7 @@
}}

{%
set blockchains = [
"ethereum"
, "arbitrum"
, "base"
, "bnb"
, "fantom"
, "gnosis"
, "optimism"
, "polygon"
, "zkevm"
, "zksync"
, "zora"
]
set blockchains = uniswap_exposed_blockchains_list()
%}

with uniswap_pool_created_logs as (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,7 @@
}}

{%
set blockchains = [
"ethereum"
, "arbitrum"
, "base"
, "bnb"
, "fantom"
, "gnosis"
, "optimism"
, "polygon"
, "zkevm"
, "zksync"
, "zora"
]
set blockchains = uniswap_exposed_blockchains_list()
%}

with uniswap_pool_swap_logs as (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,10 @@
}}

{%
set blockchains = [
"ethereum"
, "arbitrum"
, "base"
, "bnb"
, "fantom"
, "gnosis"
, "optimism"
, "polygon"
, "zkevm"
, "zksync"
, "zora"
]
set blockchains = uniswap_exposed_blockchains_list()
%}

with factory_events as (
with uniswap_pool_created_logs as (
{% for blockchain in blockchains %}
select
'{{blockchain}}' as blockchain,
Expand All @@ -42,5 +30,5 @@ with factory_events as (
{% endfor %}
)

select * from factory_events
select * from uniswap_pool_created_logs

Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,10 @@
}}

{%
set blockchains = [
"ethereum"
, "arbitrum"
, "base"
, "bnb"
, "fantom"
, "gnosis"
, "optimism"
, "polygon"
, "zkevm"
, "zksync"
, "zora"
]
set blockchains = uniswap_exposed_blockchains_list()
%}

with pool_events as (
with uniswap_pool_swap_logs as (
{% for blockchain in blockchains %}
select
'{{blockchain}}' as blockchain,
Expand All @@ -42,4 +30,4 @@ with pool_events as (
{% endfor %}
)

select * from pool_events
select * from uniswap_pool_swap_logs

0 comments on commit 06c2281

Please sign in to comment.