diff --git a/dbt_subprojects/dex/macros/models/_project/paraswap/all-entities.sql b/dbt_subprojects/dex/macros/models/_project/paraswap/all-entities.sql index 8aaafa92291..a6a0b1627f7 100644 --- a/dbt_subprojects/dex/macros/models/_project/paraswap/all-entities.sql +++ b/dbt_subprojects/dex/macros/models/_project/paraswap/all-entities.sql @@ -15,6 +15,8 @@ set delta_configs = [ ['ethereum', 'delta-v2', 'paraswapdelta_base.ParaswapDeltav2_evt_OrderPartiallyFilled', 'contract_address', 'evt_block_time', 'evt_tx_hash', 'evt_tx_from <> 0xace5ae3de4baffc4a45028659c5ee330764e4f53', '0'], ['base', 'delta-v2', 'paraswapdelta_base.ParaswapDeltav2_evt_OrderSettled', 'contract_address', 'evt_block_time', 'evt_tx_hash', 'evt_tx_from <> 0xace5ae3de4baffc4a45028659c5ee330764e4f53', '0'], ['base', 'delta-v2', 'paraswapdelta_base.ParaswapDeltav2_evt_OrderPartiallyFilled', 'contract_address', 'evt_block_time', 'evt_tx_hash', 'evt_tx_from <> 0xace5ae3de4baffc4a45028659c5ee330764e4f53', '0'], + ['optimism', 'delta-v2', 'paraswapdelta_optimism.ParaswapDeltav2_evt_OrderSettled', 'contract_address', 'evt_block_time', 'evt_tx_hash', 'evt_tx_from <> 0xace5ae3de4baffc4a45028659c5ee330764e4f53', '0'], + ['optimism', 'delta-v2', 'paraswapdelta_optimism.ParaswapDeltav2_evt_OrderPartiallyFilled', 'contract_address', 'evt_block_time', 'evt_tx_hash', 'evt_tx_from <> 0xace5ae3de4baffc4a45028659c5ee330764e4f53', '0'], ['ethereum', 'augustus', 'dex_aggregator.trades', 'project_contract_address', 'block_time', 'tx_hash', "project='paraswap' and blockchain='ethereum'", 'amount_usd'], ['polygon', 'augustus', 'dex_aggregator.trades', 'project_contract_address', 'block_time', 'tx_hash', "project='paraswap' and blockchain='polygon'", 'amount_usd'], @@ -42,4 +44,4 @@ with entities as ( {% if not loop.last %} union all {% endif %} {% endfor %} ) -{% endmacro %} \ No newline at end of file +{% endmacro %} diff --git a/dbt_subprojects/dex/target/compiled/dex/models/_projects/paraswap/all-entities-aggregated.sql b/dbt_subprojects/dex/target/compiled/dex/models/_projects/paraswap/all-entities-aggregated.sql index af7b88d1026..f610f8f114e 100644 --- a/dbt_subprojects/dex/target/compiled/dex/models/_projects/paraswap/all-entities-aggregated.sql +++ b/dbt_subprojects/dex/target/compiled/dex/models/_projects/paraswap/all-entities-aggregated.sql @@ -49,6 +49,22 @@ with entities as ( union all + select 'delta-v2' as entity, 'optimism' as blockchain, contract_address as contract_address, evt_block_time as block_time, evt_tx_hash as tx_hash, 0 as usd_value from paraswapdelta_optimism.ParaswapDeltav2_evt_OrderSettled + where + (evt_block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') + + AND evt_tx_from <> 0xace5ae3de4baffc4a45028659c5ee330764e4f53 + + union all + + select 'delta-v2' as entity, 'optimism' as blockchain, contract_address as contract_address, evt_block_time as block_time, evt_tx_hash as tx_hash, 0 as usd_value from paraswapdelta_optimism.ParaswapDeltav2_evt_OrderPartiallyFilled + where + (evt_block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') + + AND evt_tx_from <> 0xace5ae3de4baffc4a45028659c5ee330764e4f53 + + union all + select 'augustus' as entity, 'ethereum' as blockchain, project_contract_address as contract_address, block_time as block_time, tx_hash as tx_hash, amount_usd as usd_value from dex_aggregator.trades where (block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') diff --git a/dbt_subprojects/dex/target/compiled/dex/models/_projects/paraswap/all-entities-details.sql b/dbt_subprojects/dex/target/compiled/dex/models/_projects/paraswap/all-entities-details.sql index f2daac23795..97954431da6 100644 --- a/dbt_subprojects/dex/target/compiled/dex/models/_projects/paraswap/all-entities-details.sql +++ b/dbt_subprojects/dex/target/compiled/dex/models/_projects/paraswap/all-entities-details.sql @@ -51,6 +51,22 @@ with entities as ( union all + select 'delta-v2' as entity, 'optimism' as blockchain, contract_address as contract_address, evt_block_time as block_time, evt_tx_hash as tx_hash, 0 as usd_value from paraswapdelta_optimism.ParaswapDeltav2_evt_OrderSettled + where + (evt_block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') + + AND evt_tx_from <> 0xace5ae3de4baffc4a45028659c5ee330764e4f53 + + union all + + select 'delta-v2' as entity, 'optimism' as blockchain, contract_address as contract_address, evt_block_time as block_time, evt_tx_hash as tx_hash, 0 as usd_value from paraswapdelta_optimism.ParaswapDeltav2_evt_OrderPartiallyFilled + where + (evt_block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}') + + AND evt_tx_from <> 0xace5ae3de4baffc4a45028659c5ee330764e4f53 + + union all + select 'augustus' as entity, 'ethereum' as blockchain, project_contract_address as contract_address, block_time as block_time, tx_hash as tx_hash, amount_usd as usd_value from dex_aggregator.trades where (block_time BETWEEN timestamp '{{date_from}}' AND timestamp '{{date_to}}')