diff --git a/models/dex/dex_raw_pools.sql b/models/dex/dex_raw_pools.sql index 246d2c22f8e..6942214f2f9 100644 --- a/models/dex/dex_raw_pools.sql +++ b/models/dex/dex_raw_pools.sql @@ -54,7 +54,6 @@ "gnosis", "fantom", "optimism", - "optimism_legacy_ovm1", "arbitrum", "celo", "base", @@ -111,8 +110,29 @@ pool_created_logs as ( ) +-- hardcoded OP legacy pools +, _optimism_ovm1_legacy as ( + select + 'optimism' as blockchain + , 'uniswap_compatible' as type + , 'v3' as version + , pool + , token0 + , token1 + , creation_block_time + , creation_block_number + , contract_address + from ( + select oldaddress as pool, * from {{ ref('uniswap_optimism_ovm1_pool_mapping') }} + union all + select newaddress as pool, * from {{ ref('uniswap_optimism_ovm1_pool_mapping') }} + ) +) + + + select - replace(blockchain, 'optimism_legacy_ovm1', 'optimism') as blockchain + blockchain , type , version , pool @@ -125,4 +145,8 @@ from pool_created_logs join creation_traces using(blockchain, tx_hash, block_number, block_time, pool) {% if is_incremental() %} where {{ incremental_predicate('block_time') }} -{% endif %} \ No newline at end of file +{% endif %} + +union all + +select * from _optimism_ovm1_legacy \ No newline at end of file diff --git a/models/dex/dex_sources.yml b/models/dex/dex_sources.yml deleted file mode 100644 index 65af416f013..00000000000 --- a/models/dex/dex_sources.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: 2 - -sources: - - name: optimism_legacy_ovm1 - description: > - optimism legacy ovm1 tables - tables: - - name: logs - loaded_at_field: block_time - - name: creation_traces - loaded_at_field: block_time - \ No newline at end of file