From 2064ab8b3e355f04b54e76305457688986b07764 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 9 Dec 2024 13:54:25 +0530 Subject: [PATCH 01/14] uniswap dex balances --- .../Opitimism/Uniswap/op_token_balances.sql | 46 +++++++++++++++++++ .../stablecoins/Opitimism/Uniswap/schema.yml | 27 +++++++++++ 2 files changed, 73 insertions(+) create mode 100644 dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql create mode 100644 dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/schema.yml diff --git a/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql b/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql new file mode 100644 index 00000000000..8256f75c830 --- /dev/null +++ b/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql @@ -0,0 +1,46 @@ +{{ + config( + schema = 'optimism', + alias = 'op_token_balances', + materialized = 'incremental', + file_format = 'delta', + incremental_strategy = 'merge', + unique_key = ['pool_address', 'snapshot_day'] + ) +}} + +WITH op_pools AS ( + SELECT + pool AS pool_address, + token0, + token1, + fee AS fee_tier, + evt_block_time AS creation_time + FROM + uniswap_v3_optimism.UniswapV3Factory_evt_PoolCreated + WHERE + token0 = 0x4200000000000000000000000000000000000042 + OR token1 = 0x4200000000000000000000000000000000000042 +), +filtered_balances AS ( + SELECT + address AS pool_address, + balance AS op_balance, + day AS snapshot_day + FROM + tokens_optimism.balances_daily + WHERE + token_address = 0x4200000000000000000000000000000000000042 +) +SELECT + p.pool_address, + p.token0, + p.token1, + p.fee_tier, + p.creation_time, + COALESCE(b.op_balance, 0) AS op_balance, + COALESCE(b.snapshot_day, CURRENT_DATE) AS snapshot_day +FROM + op_pools p +LEFT JOIN + filtered_balances b ON p.pool_address = b.pool_address; diff --git a/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/schema.yml b/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/schema.yml new file mode 100644 index 00000000000..a031e53f01c --- /dev/null +++ b/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/schema.yml @@ -0,0 +1,27 @@ +version: 2 + +models: + - name: op_token_balances + description: "Tracks OP token balances in Uniswap pools on Optimism." + meta: + blockchain: optimism + sector: DEX + project: uniswap + contributors: jason + config: + tags: ['optimism', 'op_token', 'balances', 'uniswap'] + columns: + - name: pool_address + description: "Address of the Uniswap pool." + - name: token0 + description: "Address of token0 in the pool." + - name: token1 + description: "Address of token1 in the pool." + - name: fee_tier + description: "Fee tier for the Uniswap pool." + - name: creation_time + description: "Timestamp when the pool was created." + - name: op_balance + description: "Balance of OP token in the pool." + - name: snapshot_day + description: "Date of the balance snapshot." From e194cd5ba168bd5b0b12de47effc196c017b98f4 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 9 Dec 2024 14:17:56 +0530 Subject: [PATCH 02/14] updated sql file --- .../_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql b/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql index 8256f75c830..7d8deb78063 100644 --- a/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql +++ b/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql @@ -43,4 +43,4 @@ SELECT FROM op_pools p LEFT JOIN - filtered_balances b ON p.pool_address = b.pool_address; + filtered_balances b ON p.pool_address = b.pool_address From 80eae5d6ee9010542f6b3b7a3e9fedde461ed7fe Mon Sep 17 00:00:00 2001 From: Jason4276 <155130636+Jason4276@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:20:18 +0530 Subject: [PATCH 03/14] Update op_token_balances.sql --- .../_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql b/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql index 8256f75c830..7d8deb78063 100644 --- a/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql +++ b/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql @@ -43,4 +43,4 @@ SELECT FROM op_pools p LEFT JOIN - filtered_balances b ON p.pool_address = b.pool_address; + filtered_balances b ON p.pool_address = b.pool_address From e504d22632c0d2cb40a9c51fe28d84ffc4bdf891 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 9 Dec 2024 14:28:22 +0530 Subject: [PATCH 04/14] updated sql file --- .../stablecoins/Opitimism/Uniswap/op_token_balances.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql b/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql index 7d8deb78063..91915911301 100644 --- a/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql +++ b/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql @@ -17,7 +17,7 @@ WITH op_pools AS ( fee AS fee_tier, evt_block_time AS creation_time FROM - uniswap_v3_optimism.UniswapV3Factory_evt_PoolCreated + {{ source('uniswap_v3_optimism', 'UniswapV3Factory_evt_PoolCreated') }} WHERE token0 = 0x4200000000000000000000000000000000000042 OR token1 = 0x4200000000000000000000000000000000000042 @@ -28,7 +28,7 @@ filtered_balances AS ( balance AS op_balance, day AS snapshot_day FROM - tokens_optimism.balances_daily + {{ source('tokens_optimism', 'balances_daily') }} WHERE token_address = 0x4200000000000000000000000000000000000042 ) From 678785b3045a8ab3b4a419ec94cf52187bb63cd4 Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 11 Dec 2024 15:38:59 +0530 Subject: [PATCH 05/14] updated files --- .../dex/pools/optimism/uniswap/_schema.yml | 17 ++++++++++++ .../dex/pools/optimism/uniswap/_sources.yml | 9 +++++++ .../uniswap_pools_optimism_balances.sql} | 24 ++++++++++------- .../stablecoins/Opitimism/Uniswap/schema.yml | 27 ------------------- 4 files changed, 41 insertions(+), 36 deletions(-) create mode 100644 dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_schema.yml create mode 100644 dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_sources.yml rename dbt_subprojects/daily_spellbook/models/_sector/{stablecoins/Opitimism/Uniswap/op_token_balances.sql => dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql} (58%) delete mode 100644 dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/schema.yml diff --git a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_schema.yml b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_schema.yml new file mode 100644 index 00000000000..6a6c1b7af21 --- /dev/null +++ b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_schema.yml @@ -0,0 +1,17 @@ +version: 2 + +models: + - name: uniswap_pools_optimism_balances + description: "Tracks OP token balances in Uniswap pools on Optimism." + meta: + blockchain: optimism + sector: DEX + project: uniswap + contributors: jason + config: + tags: ['optimism', 'op_token', 'balances', 'uniswap'] + data_tests: + - dbt_utils.unique_combination_of_columns: + combination_of_columns: + - pool_address + - snapshot_day \ No newline at end of file diff --git a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_sources.yml b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_sources.yml new file mode 100644 index 00000000000..3bb6698de7c --- /dev/null +++ b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_sources.yml @@ -0,0 +1,9 @@ +version: 2 + +sources: + - name: uniswap_v3_optimism + tables: + - name: UniswapV3Factory_evt_PoolCreated + - name: tokens_optimism + tables: + - name: balances_daily \ No newline at end of file diff --git a/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql similarity index 58% rename from dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql rename to dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql index 91915911301..0d5bd3fcd8e 100644 --- a/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql +++ b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql @@ -1,12 +1,13 @@ {{ config( - schema = 'optimism', - alias = 'op_token_balances', + schema = 'uniswap_pools_optimism', + alias = 'balances', materialized = 'incremental', file_format = 'delta', incremental_strategy = 'merge', - unique_key = ['pool_address', 'snapshot_day'] - ) + unique_key = ['pool_address', 'snapshot_day'], + incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.snapshot_day')] + ) }} WITH op_pools AS ( @@ -18,9 +19,9 @@ WITH op_pools AS ( evt_block_time AS creation_time FROM {{ source('uniswap_v3_optimism', 'UniswapV3Factory_evt_PoolCreated') }} - WHERE - token0 = 0x4200000000000000000000000000000000000042 - OR token1 = 0x4200000000000000000000000000000000000042 + WHERE + (token0 = 0x4200000000000000000000000000000000000042 + OR token1 = 0x4200000000000000000000000000000000000042) ), filtered_balances AS ( SELECT @@ -29,8 +30,13 @@ filtered_balances AS ( day AS snapshot_day FROM {{ source('tokens_optimism', 'balances_daily') }} - WHERE + WHERE token_address = 0x4200000000000000000000000000000000000042 + {% if is_incremental() %} + and {{ incremental_predicate('day') }} + {% else %} + and day >= date '2021-11-11' --first pool initiated + {% endif %} ) SELECT p.pool_address, @@ -43,4 +49,4 @@ SELECT FROM op_pools p LEFT JOIN - filtered_balances b ON p.pool_address = b.pool_address + filtered_balances b ON p.pool_address = b.pool_address \ No newline at end of file diff --git a/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/schema.yml b/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/schema.yml deleted file mode 100644 index a031e53f01c..00000000000 --- a/dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/schema.yml +++ /dev/null @@ -1,27 +0,0 @@ -version: 2 - -models: - - name: op_token_balances - description: "Tracks OP token balances in Uniswap pools on Optimism." - meta: - blockchain: optimism - sector: DEX - project: uniswap - contributors: jason - config: - tags: ['optimism', 'op_token', 'balances', 'uniswap'] - columns: - - name: pool_address - description: "Address of the Uniswap pool." - - name: token0 - description: "Address of token0 in the pool." - - name: token1 - description: "Address of token1 in the pool." - - name: fee_tier - description: "Fee tier for the Uniswap pool." - - name: creation_time - description: "Timestamp when the pool was created." - - name: op_balance - description: "Balance of OP token in the pool." - - name: snapshot_day - description: "Date of the balance snapshot." From cb646dbdcb2b1fc50b52d77166549e64b848cd3e Mon Sep 17 00:00:00 2001 From: jason Date: Thu, 12 Dec 2024 14:13:28 +0530 Subject: [PATCH 06/14] updated sources file --- .../models/_sector/dex/pools/optimism/uniswap/_sources.yml | 5 +---- sources/_subprojects_outputs/tokens/balances.yml | 5 ++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_sources.yml b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_sources.yml index 3bb6698de7c..0925956cff3 100644 --- a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_sources.yml +++ b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_sources.yml @@ -3,7 +3,4 @@ version: 2 sources: - name: uniswap_v3_optimism tables: - - name: UniswapV3Factory_evt_PoolCreated - - name: tokens_optimism - tables: - - name: balances_daily \ No newline at end of file + - name: UniswapV3Factory_evt_PoolCreated \ No newline at end of file diff --git a/sources/_subprojects_outputs/tokens/balances.yml b/sources/_subprojects_outputs/tokens/balances.yml index dc994a80daa..a17a30ff728 100644 --- a/sources/_subprojects_outputs/tokens/balances.yml +++ b/sources/_subprojects_outputs/tokens/balances.yml @@ -39,4 +39,7 @@ sources: - name: tokens_scroll tables: - name: balances_daily_agg - - name: balances_daily_agg_base \ No newline at end of file + - name: balances_daily_agg_base + - name: tokens_optimism + tables: + - name: balances_daily \ No newline at end of file From eaf15c18103363508d3aa8e9d83bbd786d73b341 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 16 Dec 2024 14:07:55 +0530 Subject: [PATCH 07/14] Upadate source --- .../models/_sector/dex/pools/optimism/uniswap/_sources.yml | 6 ------ .../optimism/uniswap/uniswap_pools_optimism_balances.sql | 1 + sources/_sector/dex/trades/optimism/_sources.yml | 2 ++ sources/_subprojects_outputs/tokens/balances.yml | 6 ++---- 4 files changed, 5 insertions(+), 10 deletions(-) delete mode 100644 dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_sources.yml diff --git a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_sources.yml b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_sources.yml deleted file mode 100644 index 0925956cff3..00000000000 --- a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_sources.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 - -sources: - - name: uniswap_v3_optimism - tables: - - name: UniswapV3Factory_evt_PoolCreated \ No newline at end of file diff --git a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql index 0d5bd3fcd8e..282f43dac26 100644 --- a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql +++ b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql @@ -15,6 +15,7 @@ WITH op_pools AS ( pool AS pool_address, token0, token1, + fee AS fee_tier, evt_block_time AS creation_time FROM diff --git a/sources/_sector/dex/trades/optimism/_sources.yml b/sources/_sector/dex/trades/optimism/_sources.yml index e13ce79639f..b03ac18100b 100644 --- a/sources/_sector/dex/trades/optimism/_sources.yml +++ b/sources/_sector/dex/trades/optimism/_sources.yml @@ -2,6 +2,8 @@ version: 2 sources: - name: uniswap_v3_optimism + tables: + - name: UniswapV3Factory_evt_PoolCreated - name: sushi_optimism tables: - name: ConstantProductPool_evt_Swap diff --git a/sources/_subprojects_outputs/tokens/balances.yml b/sources/_subprojects_outputs/tokens/balances.yml index a17a30ff728..3c8f8f46e79 100644 --- a/sources/_subprojects_outputs/tokens/balances.yml +++ b/sources/_subprojects_outputs/tokens/balances.yml @@ -8,6 +8,7 @@ sources: tables: - name: balances_daily_agg - name: balances_daily_agg_base + - name: balances_daily - name: tokens_polygon tables: - name: balances_daily_agg @@ -39,7 +40,4 @@ sources: - name: tokens_scroll tables: - name: balances_daily_agg - - name: balances_daily_agg_base - - name: tokens_optimism - tables: - - name: balances_daily \ No newline at end of file + - name: balances_daily_agg_base \ No newline at end of file From e63af4b9c57f16bfb2e53559a36fa3fd9bae8bf9 Mon Sep 17 00:00:00 2001 From: Jason4276 <155130636+Jason4276@users.noreply.github.com> Date: Tue, 17 Dec 2024 14:25:25 +0530 Subject: [PATCH 08/14] Update _sources.yml --- sources/_sector/dex/trades/optimism/_sources.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources/_sector/dex/trades/optimism/_sources.yml b/sources/_sector/dex/trades/optimism/_sources.yml index b03ac18100b..e13ce79639f 100644 --- a/sources/_sector/dex/trades/optimism/_sources.yml +++ b/sources/_sector/dex/trades/optimism/_sources.yml @@ -2,8 +2,6 @@ version: 2 sources: - name: uniswap_v3_optimism - tables: - - name: UniswapV3Factory_evt_PoolCreated - name: sushi_optimism tables: - name: ConstantProductPool_evt_Swap From c15e263a21a1dc4dcc08ffbffc4a201f812cb346 Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 18 Dec 2024 15:59:33 +0530 Subject: [PATCH 09/14] Upadate source --- .../optimism/uniswap/uniswap_pools_optimism_balances.sql | 3 +-- sources/_subprojects_outputs/dex/_sources.yml | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql index 282f43dac26..eebe4525eb6 100644 --- a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql +++ b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql @@ -15,11 +15,10 @@ WITH op_pools AS ( pool AS pool_address, token0, token1, - fee AS fee_tier, evt_block_time AS creation_time FROM - {{ source('uniswap_v3_optimism', 'UniswapV3Factory_evt_PoolCreated') }} + {{ source('uniswap_optimism', 'pools') }} WHERE (token0 = 0x4200000000000000000000000000000000000042 OR token1 = 0x4200000000000000000000000000000000000042) diff --git a/sources/_subprojects_outputs/dex/_sources.yml b/sources/_subprojects_outputs/dex/_sources.yml index 88751103645..49c7bed181b 100644 --- a/sources/_subprojects_outputs/dex/_sources.yml +++ b/sources/_subprojects_outputs/dex/_sources.yml @@ -74,4 +74,7 @@ sources: - name: trades - name: beethoven_x tables: - - name: trades + - name: trades + - name: uniswap_optimism + tables: + - name: pools From 955aa94046b11dc476253e27e94a67e7390db123 Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 18 Dec 2024 16:14:06 +0530 Subject: [PATCH 10/14] Upadate source --- sources/_subprojects_outputs/dex/_sources.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/_subprojects_outputs/dex/_sources.yml b/sources/_subprojects_outputs/dex/_sources.yml index 49c7bed181b..5a5f7a544ea 100644 --- a/sources/_subprojects_outputs/dex/_sources.yml +++ b/sources/_subprojects_outputs/dex/_sources.yml @@ -75,6 +75,6 @@ sources: - name: beethoven_x tables: - name: trades - - name: uniswap_optimism + - name: uniswap_v3_optimism tables: - - name: pools + - name: pools From d6902fe12517e3dc8a77471bc33e199f2434b364 Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 18 Dec 2024 16:19:09 +0530 Subject: [PATCH 11/14] Upadate sql file --- .../pools/optimism/uniswap/uniswap_pools_optimism_balances.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql index eebe4525eb6..4b193d33dcf 100644 --- a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql +++ b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql @@ -18,7 +18,7 @@ WITH op_pools AS ( fee AS fee_tier, evt_block_time AS creation_time FROM - {{ source('uniswap_optimism', 'pools') }} + {{ source('uniswap_v3_optimism', 'pools') }} WHERE (token0 = 0x4200000000000000000000000000000000000042 OR token1 = 0x4200000000000000000000000000000000000042) From 5ac9413506903cca32614536b11141bddcbb554a Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 18 Dec 2024 17:00:17 +0530 Subject: [PATCH 12/14] Upadate sql file --- .../pools/optimism/uniswap/uniswap_pools_optimism_balances.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql index 4b193d33dcf..29c36cadc27 100644 --- a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql +++ b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql @@ -16,7 +16,7 @@ WITH op_pools AS ( token0, token1, fee AS fee_tier, - evt_block_time AS creation_time + creation_block_time AS creation_time FROM {{ source('uniswap_v3_optimism', 'pools') }} WHERE From 47b30055c74894d65ea5097e0b4211dc58939861 Mon Sep 17 00:00:00 2001 From: jason Date: Fri, 20 Dec 2024 09:56:15 +0530 Subject: [PATCH 13/14] Upadate sql file --- .../pools/optimism/uniswap/uniswap_pools_optimism_balances.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql index 29c36cadc27..aa02d310647 100644 --- a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql +++ b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql @@ -18,7 +18,7 @@ WITH op_pools AS ( fee AS fee_tier, creation_block_time AS creation_time FROM - {{ source('uniswap_v3_optimism', 'pools') }} + {{ source('uniswap_optimism', 'pools') }} WHERE (token0 = 0x4200000000000000000000000000000000000042 OR token1 = 0x4200000000000000000000000000000000000042) From 7f5c0fe91c5ff97447c59b20cd05fbc4c40c30d6 Mon Sep 17 00:00:00 2001 From: jason Date: Fri, 20 Dec 2024 10:13:49 +0530 Subject: [PATCH 14/14] Upadate sql file --- .../pools/optimism/uniswap/uniswap_pools_optimism_balances.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql index aa02d310647..29c36cadc27 100644 --- a/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql +++ b/dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/uniswap_pools_optimism_balances.sql @@ -18,7 +18,7 @@ WITH op_pools AS ( fee AS fee_tier, creation_block_time AS creation_time FROM - {{ source('uniswap_optimism', 'pools') }} + {{ source('uniswap_v3_optimism', 'pools') }} WHERE (token0 = 0x4200000000000000000000000000000000000042 OR token1 = 0x4200000000000000000000000000000000000042)