diff --git a/dbt_subprojects/dex/models/trades/optimism/platforms/velodrome_optimism_base_trades.sql b/dbt_subprojects/dex/models/trades/optimism/platforms/velodrome_optimism_base_trades.sql index 99e79dcf5ab..5d1892499c3 100644 --- a/dbt_subprojects/dex/models/trades/optimism/platforms/velodrome_optimism_base_trades.sql +++ b/dbt_subprojects/dex/models/trades/optimism/platforms/velodrome_optimism_base_trades.sql @@ -35,6 +35,19 @@ dexs_v2 AS ( pair_column_name = 'pool' ) }} +), + +dexs_v2_cl AS ( + {{ + uniswap_compatible_v3_trades( + blockchain = 'optimism', + project = 'velodrome', + version = '2_cl', + Pair_evt_Swap = source('velodrome_v2_optimism', 'CLPool_evt_Swap'), + Factory_evt_PoolCreated = source('velodrome_v2_optimism', 'CLFactory_evt_PoolCreated'), + optional_columns = [] + ) + }} ) SELECT @@ -74,3 +87,22 @@ SELECT dexs_v2.tx_hash, dexs_v2.evt_index FROM dexs_v2 +UNION ALL +SELECT + dexs_v2_cl.blockchain, + dexs_v2_cl.project, + dexs_v2_cl.version, + dexs_v2_cl.block_month, + dexs_v2_cl.block_date, + dexs_v2_cl.block_time, + dexs_v2_cl.block_number, + dexs_v2_cl.token_bought_amount_raw, + dexs_v2_cl.token_sold_amount_raw, + dexs_v2_cl.token_bought_address, + dexs_v2_cl.token_sold_address, + dexs_v2_cl.taker, + dexs_v2_cl.maker, + dexs_v2_cl.project_contract_address, + dexs_v2_cl.tx_hash, + dexs_v2_cl.evt_index +FROM dexs_v2_cl diff --git a/dbt_subprojects/dex/seeds/trades/velodrome_optimism_base_trades_seed.csv b/dbt_subprojects/dex/seeds/trades/velodrome_optimism_base_trades_seed.csv index f01ea5b7d49..b307799c535 100644 --- a/dbt_subprojects/dex/seeds/trades/velodrome_optimism_base_trades_seed.csv +++ b/dbt_subprojects/dex/seeds/trades/velodrome_optimism_base_trades_seed.csv @@ -1,3 +1,4 @@ blockchain,project,version,block_date,tx_hash,evt_index,token_bought_address,token_sold_address,block_number,token_bought_amount_raw,token_sold_amount_raw optimism,velodrome,1,2022-12-02,0x8c4641cbf23a94be095e73660510f7e265d76601b414ea6f838f651609741c87,7,0x7f5c764cbc14f9669b88837ca1490cca17c31607,0x4200000000000000000000000000000000000042,44680205,338699889,311000000000000000000 optimism,velodrome,1,2022-12-02,0x52e9f5710d07923e189104e31b1c98f569a9fa038b41b67043e9b991fcf7a95f,5,0x7f5c764cbc14f9669b88837ca1490cca17c31607,0x4200000000000000000000000000000000000042,44680219,896242313,823875076815262169601 +optimism,velodrome,2_cl,2024-11-02,0x51640a4ccd7d75ef0a220f98c2d8933bec9aaf999500915978e9946b291f360b,51,0x4200000000000000000000000000000000000042,0x4200000000000000000000000000000000000006,127465980,100818951495215196673,60129070969035172 \ No newline at end of file