From 76d004ef9316e923c45dd725729618d0670c71ea Mon Sep 17 00:00:00 2001 From: Eduard Gorkh <40689054+grkhr@users.noreply.github.com> Date: Fri, 5 Jul 2024 08:38:53 +0200 Subject: [PATCH] 1inch-U32: move `project_` lineage to `daily_spellbook` (#6321) * move project_ lineage to daily * apply easy dates * rm * Update package-lock.yml * rm * Revert "apply easy dates" This reverts commit cfa83e251d6af874c337b7b86475f218375ec3e8. * try project swaps from 2019 * rm yml description * upd uniswap contracts --- .../_meta/oneinch_mapped_contracts_macro.sql | 6 ++++-- .../oneinch/_meta/oneinch_mapped_methods.sql | 0 ...h_project_swaps_exposed_blockchains_list.sql | 13 +++++++++++++ .../oneinch_project_orders_cfg_events_macro.sql | 0 ...oneinch_project_orders_cfg_methods_macro.sql | 0 .../project/oneinch_project_calls_macro.sql | 5 +++-- .../project/oneinch_project_orders_macro.sql | 5 ++++- .../oneinch_project_orders_raw_logs_macro.sql | 0 .../oneinch_project_orders_raw_traces_macro.sql | 0 .../project/oneinch_project_swaps_macro.sql | 17 +++++++++++------ .../oneinch/_meta/oneinch_mapped_contracts.sql | 2 +- .../oneinch/_meta/oneinch_mapped_methods.sql | 2 +- .../_meta/oneinch_arbitrum_mapped_contracts.sql | 0 .../_meta/oneinch_arbitrum_mapped_methods.sql | 0 .../project/oneinch_arbitrum_project_calls.sql | 1 + .../project/oneinch_arbitrum_project_orders.sql | 2 ++ ...oneinch_arbitrum_project_orders_raw_logs.sql | 0 ...einch_arbitrum_project_orders_raw_traces.sql | 0 .../project/oneinch_arbitrum_project_swaps.sql | 1 + .../oneinch_avalanche_c_mapped_contracts.sql | 0 .../oneinch_avalanche_c_mapped_methods.sql | 0 .../oneinch_avalanche_c_project_calls.sql | 1 + .../oneinch_avalanche_c_project_orders.sql | 2 ++ ...inch_avalanche_c_project_orders_raw_logs.sql | 0 ...ch_avalanche_c_project_orders_raw_traces.sql | 0 .../oneinch_avalanche_c_project_swaps.sql | 1 + .../_meta/oneinch_base_mapped_contracts.sql | 0 .../base/_meta/oneinch_base_mapped_methods.sql | 0 .../base/project/oneinch_base_project_calls.sql | 1 + .../project/oneinch_base_project_orders.sql | 2 ++ .../oneinch_base_project_orders_raw_logs.sql | 0 .../oneinch_base_project_orders_raw_traces.sql | 0 .../base/project/oneinch_base_project_swaps.sql | 2 +- .../bnb/_meta/oneinch_bnb_mapped_contracts.sql | 0 .../bnb/_meta/oneinch_bnb_mapped_methods.sql | 0 .../bnb/project/oneinch_bnb_project_calls.sql | 1 + .../bnb/project/oneinch_bnb_project_orders.sql | 2 ++ .../oneinch_bnb_project_orders_raw_logs.sql | 0 .../oneinch_bnb_project_orders_raw_traces.sql | 0 .../bnb/project/oneinch_bnb_project_swaps.sql | 1 + .../_meta/oneinch_ethereum_mapped_contracts.sql | 0 .../_meta/oneinch_ethereum_mapped_methods.sql | 0 .../project/oneinch_ethereum_project_calls.sql | 1 + .../project/oneinch_ethereum_project_orders.sql | 2 ++ ...oneinch_ethereum_project_orders_raw_logs.sql | 0 ...einch_ethereum_project_orders_raw_traces.sql | 0 .../project/oneinch_ethereum_project_swaps.sql | 1 + .../_meta/oneinch_fantom_mapped_contracts.sql | 0 .../_meta/oneinch_fantom_mapped_methods.sql | 0 .../project/oneinch_fantom_project_calls.sql | 1 + .../project/oneinch_fantom_project_orders.sql | 2 ++ .../oneinch_fantom_project_orders_raw_logs.sql | 0 ...oneinch_fantom_project_orders_raw_traces.sql | 0 .../project/oneinch_fantom_project_swaps.sql | 1 + .../_meta/oneinch_gnosis_mapped_contracts.sql | 0 .../_meta/oneinch_gnosis_mapped_methods.sql | 0 .../project/oneinch_gnosis_project_calls.sql | 1 + .../project/oneinch_gnosis_project_orders.sql | 2 ++ .../oneinch_gnosis_project_orders_raw_logs.sql | 0 ...oneinch_gnosis_project_orders_raw_traces.sql | 0 .../project/oneinch_gnosis_project_swaps.sql | 1 + .../oneinch/oneinch_project_orders.sql | 8 +++++--- .../_projects/oneinch/oneinch_project_swaps.sql | 4 +++- .../_meta/oneinch_optimism_mapped_contracts.sql | 0 .../_meta/oneinch_optimism_mapped_methods.sql | 0 .../project/oneinch_optimism_project_calls.sql | 1 + .../project/oneinch_optimism_project_orders.sql | 2 ++ ...oneinch_optimism_project_orders_raw_logs.sql | 0 ...einch_optimism_project_orders_raw_traces.sql | 0 .../project/oneinch_optimism_project_swaps.sql | 1 + .../_meta/oneinch_polygon_mapped_contracts.sql | 0 .../_meta/oneinch_polygon_mapped_methods.sql | 0 .../project/oneinch_polygon_project_calls.sql | 1 + .../project/oneinch_polygon_project_orders.sql | 2 ++ .../oneinch_polygon_project_orders_raw_logs.sql | 0 ...neinch_polygon_project_orders_raw_traces.sql | 0 .../project/oneinch_polygon_project_swaps.sql | 1 + .../_meta/oneinch_zksync_mapped_contracts.sql | 0 .../_meta/oneinch_zksync_mapped_methods.sql | 0 .../project/oneinch_zksync_project_calls.sql | 1 + .../project/oneinch_zksync_project_orders.sql | 2 ++ .../oneinch_zksync_project_orders_raw_logs.sql | 0 ...oneinch_zksync_project_orders_raw_traces.sql | 0 .../project/oneinch_zksync_project_swaps.sql | 1 + sources/oneinch/oneinch_sources.yml | 9 +++++++++ 85 files changed, 94 insertions(+), 18 deletions(-) rename {dex => daily_spellbook}/macros/models/_project/oneinch/_meta/oneinch_mapped_contracts_macro.sql (99%) rename {dex => daily_spellbook}/macros/models/_project/oneinch/_meta/oneinch_mapped_methods.sql (100%) create mode 100644 daily_spellbook/macros/models/_project/oneinch/_meta/oneinch_project_swaps_exposed_blockchains_list.sql rename {dex => daily_spellbook}/macros/models/_project/oneinch/project/cfg/oneinch_project_orders_cfg_events_macro.sql (100%) rename {dex => daily_spellbook}/macros/models/_project/oneinch/project/cfg/oneinch_project_orders_cfg_methods_macro.sql (100%) rename {dex => daily_spellbook}/macros/models/_project/oneinch/project/oneinch_project_calls_macro.sql (96%) rename {dex => daily_spellbook}/macros/models/_project/oneinch/project/oneinch_project_orders_macro.sql (99%) rename {dex => daily_spellbook}/macros/models/_project/oneinch/project/oneinch_project_orders_raw_logs_macro.sql (100%) rename {dex => daily_spellbook}/macros/models/_project/oneinch/project/oneinch_project_orders_raw_traces_macro.sql (100%) rename {dex => daily_spellbook}/macros/models/_project/oneinch/project/oneinch_project_swaps_macro.sql (94%) rename {dex => daily_spellbook}/models/_projects/oneinch/_meta/oneinch_mapped_contracts.sql (82%) rename {dex => daily_spellbook}/models/_projects/oneinch/_meta/oneinch_mapped_methods.sql (82%) rename {dex => daily_spellbook}/models/_projects/oneinch/arbitrum/_meta/oneinch_arbitrum_mapped_contracts.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/arbitrum/_meta/oneinch_arbitrum_mapped_methods.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_calls.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders.sql (78%) rename {dex => daily_spellbook}/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders_raw_logs.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders_raw_traces.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_swaps.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/avalanche_c/_meta/oneinch_avalanche_c_mapped_contracts.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/avalanche_c/_meta/oneinch_avalanche_c_mapped_methods.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_calls.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders.sql (78%) rename {dex => daily_spellbook}/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders_raw_logs.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders_raw_traces.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_swaps.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/base/_meta/oneinch_base_mapped_contracts.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/base/_meta/oneinch_base_mapped_methods.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/base/project/oneinch_base_project_calls.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/base/project/oneinch_base_project_orders.sql (77%) rename {dex => daily_spellbook}/models/_projects/oneinch/base/project/oneinch_base_project_orders_raw_logs.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/base/project/oneinch_base_project_orders_raw_traces.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/base/project/oneinch_base_project_swaps.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/bnb/_meta/oneinch_bnb_mapped_contracts.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/bnb/_meta/oneinch_bnb_mapped_methods.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/bnb/project/oneinch_bnb_project_calls.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders.sql (77%) rename {dex => daily_spellbook}/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders_raw_logs.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders_raw_traces.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/bnb/project/oneinch_bnb_project_swaps.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/ethereum/_meta/oneinch_ethereum_mapped_contracts.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/ethereum/_meta/oneinch_ethereum_mapped_methods.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_calls.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders.sql (78%) rename {dex => daily_spellbook}/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders_raw_logs.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders_raw_traces.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_swaps.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/fantom/_meta/oneinch_fantom_mapped_contracts.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/fantom/_meta/oneinch_fantom_mapped_methods.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/fantom/project/oneinch_fantom_project_calls.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders.sql (77%) rename {dex => daily_spellbook}/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders_raw_logs.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders_raw_traces.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/fantom/project/oneinch_fantom_project_swaps.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/gnosis/_meta/oneinch_gnosis_mapped_contracts.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/gnosis/_meta/oneinch_gnosis_mapped_methods.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_calls.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders.sql (77%) rename {dex => daily_spellbook}/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders_raw_logs.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders_raw_traces.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_swaps.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/oneinch_project_orders.sql (94%) rename {dex => daily_spellbook}/models/_projects/oneinch/oneinch_project_swaps.sql (68%) rename {dex => daily_spellbook}/models/_projects/oneinch/optimism/_meta/oneinch_optimism_mapped_contracts.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/optimism/_meta/oneinch_optimism_mapped_methods.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/optimism/project/oneinch_optimism_project_calls.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders.sql (78%) rename {dex => daily_spellbook}/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders_raw_logs.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders_raw_traces.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/optimism/project/oneinch_optimism_project_swaps.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/polygon/_meta/oneinch_polygon_mapped_contracts.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/polygon/_meta/oneinch_polygon_mapped_methods.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/polygon/project/oneinch_polygon_project_calls.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders.sql (78%) rename {dex => daily_spellbook}/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders_raw_logs.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders_raw_traces.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/polygon/project/oneinch_polygon_project_swaps.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/zksync/_meta/oneinch_zksync_mapped_contracts.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/zksync/_meta/oneinch_zksync_mapped_methods.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/zksync/project/oneinch_zksync_project_calls.sql (88%) rename {dex => daily_spellbook}/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders.sql (77%) rename {dex => daily_spellbook}/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders_raw_logs.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders_raw_traces.sql (100%) rename {dex => daily_spellbook}/models/_projects/oneinch/zksync/project/oneinch_zksync_project_swaps.sql (88%) create mode 100644 sources/oneinch/oneinch_sources.yml diff --git a/dex/macros/models/_project/oneinch/_meta/oneinch_mapped_contracts_macro.sql b/daily_spellbook/macros/models/_project/oneinch/_meta/oneinch_mapped_contracts_macro.sql similarity index 99% rename from dex/macros/models/_project/oneinch/_meta/oneinch_mapped_contracts_macro.sql rename to daily_spellbook/macros/models/_project/oneinch/_meta/oneinch_mapped_contracts_macro.sql index b7290897b80..77aec1a94f1 100644 --- a/dex/macros/models/_project/oneinch/_meta/oneinch_mapped_contracts_macro.sql +++ b/daily_spellbook/macros/models/_project/oneinch/_meta/oneinch_mapped_contracts_macro.sql @@ -233,10 +233,12 @@ , ('0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45', 'true', 'Uniswap' , 'SwapRouter02' , ['ethereum','polygon','arbitrum','optimism']) , ('0x0000000052be00ba3a005edbe83a0fb9aadb964c', 'true', 'Uniswap' , 'UNDEFINED' , ['ethereum']) , ('0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b', 'true', 'Uniswap' , 'UniversalRouter' , ['ethereum']) - , ('0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad', 'true', 'Uniswap' , 'UniversalRouter' , ['ethereum','bnb','polygon','arbitrum','optimism']) - , ('0x4dae2f939acf50408e13d58534ff8c2776d45265', 'true', 'Uniswap' , 'UniversalRouter' , ['bnb']) + , ('0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad', 'true', 'Uniswap' , 'UniversalRouter' , ['ethereum','bnb','polygon','arbitrum','optimism','base']) + , ('0x4dae2f939acf50408e13d58534ff8c2776d45265', 'true', 'Uniswap' , 'UniversalRouter' , ['bnb','avalanche_c']) , ('0x5e325eda8064b456f4781070c0738d849c824258', 'true', 'Uniswap' , 'UniversalRouter' , ['arbitrum']) + , ('0x28731bcc616b5f51dd52cf2e4df0e78dd1136c06', 'true', 'Uniswap' , 'UniversalRouter' , ['zksync']) , ('0xec7be89e9d109e7e3fec59c222cf297125fefda2', 'true', 'Uniswap' , 'UniversalRouter' , ['polygon']) + , ('0xcb1355ff08ab38bbce60111f1bb2b784be25d7e8', 'true', 'Uniswap' , 'UniversalRouter' , ['optimism']) , ('0x5dc88340e1c5c6366864ee415d6034cadd1a9897', 'true', 'Uniswap' , 'UniversalRouter' , ['bnb']) , ('0x4c60051384bd2d3c01bfc845cf5f4b44bcbe9de5', 'true', 'Uniswap' , 'UniversalRouter' , ['polygon','arbitrum']) , ('0x643770e279d5d0733f21d6dc03a8efbabf3255b4', 'true', 'Uniswap' , 'UNDEFINED' , ['polygon']) diff --git a/dex/macros/models/_project/oneinch/_meta/oneinch_mapped_methods.sql b/daily_spellbook/macros/models/_project/oneinch/_meta/oneinch_mapped_methods.sql similarity index 100% rename from dex/macros/models/_project/oneinch/_meta/oneinch_mapped_methods.sql rename to daily_spellbook/macros/models/_project/oneinch/_meta/oneinch_mapped_methods.sql diff --git a/daily_spellbook/macros/models/_project/oneinch/_meta/oneinch_project_swaps_exposed_blockchains_list.sql b/daily_spellbook/macros/models/_project/oneinch/_meta/oneinch_project_swaps_exposed_blockchains_list.sql new file mode 100644 index 00000000000..7f0d322d55d --- /dev/null +++ b/daily_spellbook/macros/models/_project/oneinch/_meta/oneinch_project_swaps_exposed_blockchains_list.sql @@ -0,0 +1,13 @@ +{% macro oneinch_project_swaps_exposed_blockchains_list() %} + {{ return([ + 'ethereum', + 'optimism', + 'arbitrum', + 'avalanche_c', + 'polygon', + 'bnb', + 'gnosis', + 'fantom', + 'base', + ]) }} +{% endmacro %} \ No newline at end of file diff --git a/dex/macros/models/_project/oneinch/project/cfg/oneinch_project_orders_cfg_events_macro.sql b/daily_spellbook/macros/models/_project/oneinch/project/cfg/oneinch_project_orders_cfg_events_macro.sql similarity index 100% rename from dex/macros/models/_project/oneinch/project/cfg/oneinch_project_orders_cfg_events_macro.sql rename to daily_spellbook/macros/models/_project/oneinch/project/cfg/oneinch_project_orders_cfg_events_macro.sql diff --git a/dex/macros/models/_project/oneinch/project/cfg/oneinch_project_orders_cfg_methods_macro.sql b/daily_spellbook/macros/models/_project/oneinch/project/cfg/oneinch_project_orders_cfg_methods_macro.sql similarity index 100% rename from dex/macros/models/_project/oneinch/project/cfg/oneinch_project_orders_cfg_methods_macro.sql rename to daily_spellbook/macros/models/_project/oneinch/project/cfg/oneinch_project_orders_cfg_methods_macro.sql diff --git a/dex/macros/models/_project/oneinch/project/oneinch_project_calls_macro.sql b/daily_spellbook/macros/models/_project/oneinch/project/oneinch_project_calls_macro.sql similarity index 96% rename from dex/macros/models/_project/oneinch/project/oneinch_project_calls_macro.sql rename to daily_spellbook/macros/models/_project/oneinch/project/oneinch_project_calls_macro.sql index dcd194574d7..5d0ca3f8b67 100644 --- a/dex/macros/models/_project/oneinch/project/oneinch_project_calls_macro.sql +++ b/daily_spellbook/macros/models/_project/oneinch/project/oneinch_project_calls_macro.sql @@ -1,7 +1,7 @@ {% macro oneinch_project_calls_macro( blockchain - , date_from = '2023-01-01' + , date_from = '2019-01-01' ) %} @@ -21,7 +21,8 @@ static as ( select wrapped_native_token_address , native_token_symbol as native_symbol - from ({{ oneinch_blockchain_macro(blockchain) }}) + from {{ source('oneinch', 'blockchains') }} + where blockchain = '{{blockchain}}' ) , contracts as ( diff --git a/dex/macros/models/_project/oneinch/project/oneinch_project_orders_macro.sql b/daily_spellbook/macros/models/_project/oneinch/project/oneinch_project_orders_macro.sql similarity index 99% rename from dex/macros/models/_project/oneinch/project/oneinch_project_orders_macro.sql rename to daily_spellbook/macros/models/_project/oneinch/project/oneinch_project_orders_macro.sql index 13ec0e37f8d..c96dceeb894 100644 --- a/dex/macros/models/_project/oneinch/project/oneinch_project_orders_macro.sql +++ b/daily_spellbook/macros/models/_project/oneinch/project/oneinch_project_orders_macro.sql @@ -214,7 +214,10 @@ logs as ( , count(*) over(partition by block_number, tx_hash, index) as log_call_trades -- trades for each log from calls full join logs using(blockchain, block_number, block_time, tx_hash, topic0) - join ({{ oneinch_blockchain_macro(blockchain) }}) using(blockchain) + join ( + select * from {{ source('oneinch', 'blockchains') }} + where blockchain = '{{blockchain}}' + ) using(blockchain) where coalesce(call_maker = log_maker, true) and coalesce(call_taker = log_taker, true) diff --git a/dex/macros/models/_project/oneinch/project/oneinch_project_orders_raw_logs_macro.sql b/daily_spellbook/macros/models/_project/oneinch/project/oneinch_project_orders_raw_logs_macro.sql similarity index 100% rename from dex/macros/models/_project/oneinch/project/oneinch_project_orders_raw_logs_macro.sql rename to daily_spellbook/macros/models/_project/oneinch/project/oneinch_project_orders_raw_logs_macro.sql diff --git a/dex/macros/models/_project/oneinch/project/oneinch_project_orders_raw_traces_macro.sql b/daily_spellbook/macros/models/_project/oneinch/project/oneinch_project_orders_raw_traces_macro.sql similarity index 100% rename from dex/macros/models/_project/oneinch/project/oneinch_project_orders_raw_traces_macro.sql rename to daily_spellbook/macros/models/_project/oneinch/project/oneinch_project_orders_raw_traces_macro.sql diff --git a/dex/macros/models/_project/oneinch/project/oneinch_project_swaps_macro.sql b/daily_spellbook/macros/models/_project/oneinch/project/oneinch_project_swaps_macro.sql similarity index 94% rename from dex/macros/models/_project/oneinch/project/oneinch_project_swaps_macro.sql rename to daily_spellbook/macros/models/_project/oneinch/project/oneinch_project_swaps_macro.sql index 3750d92e6c3..e4422aefe8c 100644 --- a/dex/macros/models/_project/oneinch/project/oneinch_project_swaps_macro.sql +++ b/daily_spellbook/macros/models/_project/oneinch/project/oneinch_project_swaps_macro.sql @@ -1,7 +1,7 @@ {% macro oneinch_project_swaps_macro( blockchain - , date_from = '2023-01-01' + , date_from = '2019-01-01' ) %} @@ -16,7 +16,8 @@ meta as ( chain_id , wrapped_native_token_address , native_token_symbol as native_symbol - from ({{ oneinch_blockchain_macro(blockchain) }}) + from {{ source('oneinch', 'blockchains') }} + where blockchain = '{{blockchain}}' ) , orders as ( @@ -57,12 +58,13 @@ meta as ( , flags as order_flags from ( select *, row_number() over(partition by block_number, tx_hash order by call_trace_address) as counter - from {{ ref('oneinch_' + blockchain + '_lop') }} + from {{ source('oneinch', 'lop') }} where + blockchain = '{{blockchain}}' {% if is_incremental() %} - {{ incremental_predicate('block_time') }} + and {{ incremental_predicate('block_time') }} {% else %} - block_time >= timestamp '{{date_from}}' + and block_time >= timestamp '{{date_from}}' {% endif %} and call_success ) @@ -231,7 +233,10 @@ meta as ( , transfer_from , transfer_to , date_trunc('minute', block_time) as minute - from ({{ oneinch_parsed_transfers_from_calls_macro(blockchain) }}), meta + from ( + select * from {{ source('oneinch', 'parsed_transfers_from_calls') }} + where blockchain = '{{blockchain}}' + ), meta where {% if is_incremental() %} {{ incremental_predicate('block_time') }} diff --git a/dex/models/_projects/oneinch/_meta/oneinch_mapped_contracts.sql b/daily_spellbook/models/_projects/oneinch/_meta/oneinch_mapped_contracts.sql similarity index 82% rename from dex/models/_projects/oneinch/_meta/oneinch_mapped_contracts.sql rename to daily_spellbook/models/_projects/oneinch/_meta/oneinch_mapped_contracts.sql index 654db2cb48b..6695ed876c7 100644 --- a/dex/models/_projects/oneinch/_meta/oneinch_mapped_contracts.sql +++ b/daily_spellbook/models/_projects/oneinch/_meta/oneinch_mapped_contracts.sql @@ -10,7 +10,7 @@ -{% for blockchain in oneinch_exposed_blockchains_list() %} +{% for blockchain in oneinch_project_swaps_exposed_blockchains_list() %} select * from ({{ oneinch_mapped_contracts_macro(blockchain) }}) {% if not loop.last %} union all {% endif %} {% endfor %} \ No newline at end of file diff --git a/dex/models/_projects/oneinch/_meta/oneinch_mapped_methods.sql b/daily_spellbook/models/_projects/oneinch/_meta/oneinch_mapped_methods.sql similarity index 82% rename from dex/models/_projects/oneinch/_meta/oneinch_mapped_methods.sql rename to daily_spellbook/models/_projects/oneinch/_meta/oneinch_mapped_methods.sql index 6914649ce94..15e961e23d1 100644 --- a/dex/models/_projects/oneinch/_meta/oneinch_mapped_methods.sql +++ b/daily_spellbook/models/_projects/oneinch/_meta/oneinch_mapped_methods.sql @@ -10,7 +10,7 @@ -{% for blockchain in oneinch_exposed_blockchains_list() %} +{% for blockchain in oneinch_project_swaps_exposed_blockchains_list() %} select * from ({{ oneinch_mapped_methods_macro(blockchain) }}) {% if not loop.last %} union all {% endif %} {% endfor %} \ No newline at end of file diff --git a/dex/models/_projects/oneinch/arbitrum/_meta/oneinch_arbitrum_mapped_contracts.sql b/daily_spellbook/models/_projects/oneinch/arbitrum/_meta/oneinch_arbitrum_mapped_contracts.sql similarity index 100% rename from dex/models/_projects/oneinch/arbitrum/_meta/oneinch_arbitrum_mapped_contracts.sql rename to daily_spellbook/models/_projects/oneinch/arbitrum/_meta/oneinch_arbitrum_mapped_contracts.sql diff --git a/dex/models/_projects/oneinch/arbitrum/_meta/oneinch_arbitrum_mapped_methods.sql b/daily_spellbook/models/_projects/oneinch/arbitrum/_meta/oneinch_arbitrum_mapped_methods.sql similarity index 100% rename from dex/models/_projects/oneinch/arbitrum/_meta/oneinch_arbitrum_mapped_methods.sql rename to daily_spellbook/models/_projects/oneinch/arbitrum/_meta/oneinch_arbitrum_mapped_methods.sql diff --git a/dex/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_calls.sql b/daily_spellbook/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_calls.sql similarity index 88% rename from dex/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_calls.sql rename to daily_spellbook/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_calls.sql index f9a52ca41b9..d0beeee8fa4 100644 --- a/dex/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_calls.sql +++ b/daily_spellbook/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_calls.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_mapped_contracts') }} {{ diff --git a/dex/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders.sql b/daily_spellbook/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders.sql similarity index 78% rename from dex/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders.sql rename to daily_spellbook/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders.sql index bc1eaf94028..43978b71f3e 100644 --- a/dex/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders.sql +++ b/daily_spellbook/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders.sql @@ -15,6 +15,8 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_logs') }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_traces') }} {{ diff --git a/dex/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders_raw_logs.sql b/daily_spellbook/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders_raw_logs.sql similarity index 100% rename from dex/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders_raw_logs.sql rename to daily_spellbook/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders_raw_logs.sql diff --git a/dex/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders_raw_traces.sql b/daily_spellbook/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders_raw_traces.sql similarity index 100% rename from dex/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders_raw_traces.sql rename to daily_spellbook/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_orders_raw_traces.sql diff --git a/dex/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_swaps.sql b/daily_spellbook/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_swaps.sql similarity index 88% rename from dex/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_swaps.sql rename to daily_spellbook/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_swaps.sql index 7f0ef20cd25..a0c043e7983 100644 --- a/dex/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_swaps.sql +++ b/daily_spellbook/models/_projects/oneinch/arbitrum/project/oneinch_arbitrum_project_swaps.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders') }} {{ diff --git a/dex/models/_projects/oneinch/avalanche_c/_meta/oneinch_avalanche_c_mapped_contracts.sql b/daily_spellbook/models/_projects/oneinch/avalanche_c/_meta/oneinch_avalanche_c_mapped_contracts.sql similarity index 100% rename from dex/models/_projects/oneinch/avalanche_c/_meta/oneinch_avalanche_c_mapped_contracts.sql rename to daily_spellbook/models/_projects/oneinch/avalanche_c/_meta/oneinch_avalanche_c_mapped_contracts.sql diff --git a/dex/models/_projects/oneinch/avalanche_c/_meta/oneinch_avalanche_c_mapped_methods.sql b/daily_spellbook/models/_projects/oneinch/avalanche_c/_meta/oneinch_avalanche_c_mapped_methods.sql similarity index 100% rename from dex/models/_projects/oneinch/avalanche_c/_meta/oneinch_avalanche_c_mapped_methods.sql rename to daily_spellbook/models/_projects/oneinch/avalanche_c/_meta/oneinch_avalanche_c_mapped_methods.sql diff --git a/dex/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_calls.sql b/daily_spellbook/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_calls.sql similarity index 88% rename from dex/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_calls.sql rename to daily_spellbook/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_calls.sql index 108b2656d2d..d2c3a9473aa 100644 --- a/dex/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_calls.sql +++ b/daily_spellbook/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_calls.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_mapped_contracts') }} {{ diff --git a/dex/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders.sql b/daily_spellbook/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders.sql similarity index 78% rename from dex/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders.sql rename to daily_spellbook/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders.sql index ba357b28149..011c7e13797 100644 --- a/dex/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders.sql +++ b/daily_spellbook/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders.sql @@ -15,6 +15,8 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_logs') }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_traces') }} {{ diff --git a/dex/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders_raw_logs.sql b/daily_spellbook/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders_raw_logs.sql similarity index 100% rename from dex/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders_raw_logs.sql rename to daily_spellbook/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders_raw_logs.sql diff --git a/dex/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders_raw_traces.sql b/daily_spellbook/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders_raw_traces.sql similarity index 100% rename from dex/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders_raw_traces.sql rename to daily_spellbook/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_orders_raw_traces.sql diff --git a/dex/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_swaps.sql b/daily_spellbook/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_swaps.sql similarity index 88% rename from dex/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_swaps.sql rename to daily_spellbook/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_swaps.sql index 1163d3cf2b6..fba93c4ab00 100644 --- a/dex/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_swaps.sql +++ b/daily_spellbook/models/_projects/oneinch/avalanche_c/project/oneinch_avalanche_c_project_swaps.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders') }} {{ diff --git a/dex/models/_projects/oneinch/base/_meta/oneinch_base_mapped_contracts.sql b/daily_spellbook/models/_projects/oneinch/base/_meta/oneinch_base_mapped_contracts.sql similarity index 100% rename from dex/models/_projects/oneinch/base/_meta/oneinch_base_mapped_contracts.sql rename to daily_spellbook/models/_projects/oneinch/base/_meta/oneinch_base_mapped_contracts.sql diff --git a/dex/models/_projects/oneinch/base/_meta/oneinch_base_mapped_methods.sql b/daily_spellbook/models/_projects/oneinch/base/_meta/oneinch_base_mapped_methods.sql similarity index 100% rename from dex/models/_projects/oneinch/base/_meta/oneinch_base_mapped_methods.sql rename to daily_spellbook/models/_projects/oneinch/base/_meta/oneinch_base_mapped_methods.sql diff --git a/dex/models/_projects/oneinch/base/project/oneinch_base_project_calls.sql b/daily_spellbook/models/_projects/oneinch/base/project/oneinch_base_project_calls.sql similarity index 88% rename from dex/models/_projects/oneinch/base/project/oneinch_base_project_calls.sql rename to daily_spellbook/models/_projects/oneinch/base/project/oneinch_base_project_calls.sql index 0e032672355..845e683f0e5 100644 --- a/dex/models/_projects/oneinch/base/project/oneinch_base_project_calls.sql +++ b/daily_spellbook/models/_projects/oneinch/base/project/oneinch_base_project_calls.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_mapped_contracts') }} {{ diff --git a/dex/models/_projects/oneinch/base/project/oneinch_base_project_orders.sql b/daily_spellbook/models/_projects/oneinch/base/project/oneinch_base_project_orders.sql similarity index 77% rename from dex/models/_projects/oneinch/base/project/oneinch_base_project_orders.sql rename to daily_spellbook/models/_projects/oneinch/base/project/oneinch_base_project_orders.sql index 5385f0438d1..a099ab80c78 100644 --- a/dex/models/_projects/oneinch/base/project/oneinch_base_project_orders.sql +++ b/daily_spellbook/models/_projects/oneinch/base/project/oneinch_base_project_orders.sql @@ -15,6 +15,8 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_logs') }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_traces') }} {{ diff --git a/dex/models/_projects/oneinch/base/project/oneinch_base_project_orders_raw_logs.sql b/daily_spellbook/models/_projects/oneinch/base/project/oneinch_base_project_orders_raw_logs.sql similarity index 100% rename from dex/models/_projects/oneinch/base/project/oneinch_base_project_orders_raw_logs.sql rename to daily_spellbook/models/_projects/oneinch/base/project/oneinch_base_project_orders_raw_logs.sql diff --git a/dex/models/_projects/oneinch/base/project/oneinch_base_project_orders_raw_traces.sql b/daily_spellbook/models/_projects/oneinch/base/project/oneinch_base_project_orders_raw_traces.sql similarity index 100% rename from dex/models/_projects/oneinch/base/project/oneinch_base_project_orders_raw_traces.sql rename to daily_spellbook/models/_projects/oneinch/base/project/oneinch_base_project_orders_raw_traces.sql diff --git a/dex/models/_projects/oneinch/base/project/oneinch_base_project_swaps.sql b/daily_spellbook/models/_projects/oneinch/base/project/oneinch_base_project_swaps.sql similarity index 88% rename from dex/models/_projects/oneinch/base/project/oneinch_base_project_swaps.sql rename to daily_spellbook/models/_projects/oneinch/base/project/oneinch_base_project_swaps.sql index 0ee0f02ba5c..1de67c9dd07 100644 --- a/dex/models/_projects/oneinch/base/project/oneinch_base_project_swaps.sql +++ b/daily_spellbook/models/_projects/oneinch/base/project/oneinch_base_project_swaps.sql @@ -15,7 +15,7 @@ ) }} - +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders') }} {{ oneinch_project_swaps_macro( diff --git a/dex/models/_projects/oneinch/bnb/_meta/oneinch_bnb_mapped_contracts.sql b/daily_spellbook/models/_projects/oneinch/bnb/_meta/oneinch_bnb_mapped_contracts.sql similarity index 100% rename from dex/models/_projects/oneinch/bnb/_meta/oneinch_bnb_mapped_contracts.sql rename to daily_spellbook/models/_projects/oneinch/bnb/_meta/oneinch_bnb_mapped_contracts.sql diff --git a/dex/models/_projects/oneinch/bnb/_meta/oneinch_bnb_mapped_methods.sql b/daily_spellbook/models/_projects/oneinch/bnb/_meta/oneinch_bnb_mapped_methods.sql similarity index 100% rename from dex/models/_projects/oneinch/bnb/_meta/oneinch_bnb_mapped_methods.sql rename to daily_spellbook/models/_projects/oneinch/bnb/_meta/oneinch_bnb_mapped_methods.sql diff --git a/dex/models/_projects/oneinch/bnb/project/oneinch_bnb_project_calls.sql b/daily_spellbook/models/_projects/oneinch/bnb/project/oneinch_bnb_project_calls.sql similarity index 88% rename from dex/models/_projects/oneinch/bnb/project/oneinch_bnb_project_calls.sql rename to daily_spellbook/models/_projects/oneinch/bnb/project/oneinch_bnb_project_calls.sql index ce8b3a478fe..c3110d16a35 100644 --- a/dex/models/_projects/oneinch/bnb/project/oneinch_bnb_project_calls.sql +++ b/daily_spellbook/models/_projects/oneinch/bnb/project/oneinch_bnb_project_calls.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_mapped_contracts') }} {{ diff --git a/dex/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders.sql b/daily_spellbook/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders.sql similarity index 77% rename from dex/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders.sql rename to daily_spellbook/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders.sql index 2166f82a358..a7e2bb87767 100644 --- a/dex/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders.sql +++ b/daily_spellbook/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders.sql @@ -15,6 +15,8 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_logs') }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_traces') }} {{ diff --git a/dex/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders_raw_logs.sql b/daily_spellbook/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders_raw_logs.sql similarity index 100% rename from dex/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders_raw_logs.sql rename to daily_spellbook/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders_raw_logs.sql diff --git a/dex/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders_raw_traces.sql b/daily_spellbook/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders_raw_traces.sql similarity index 100% rename from dex/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders_raw_traces.sql rename to daily_spellbook/models/_projects/oneinch/bnb/project/oneinch_bnb_project_orders_raw_traces.sql diff --git a/dex/models/_projects/oneinch/bnb/project/oneinch_bnb_project_swaps.sql b/daily_spellbook/models/_projects/oneinch/bnb/project/oneinch_bnb_project_swaps.sql similarity index 88% rename from dex/models/_projects/oneinch/bnb/project/oneinch_bnb_project_swaps.sql rename to daily_spellbook/models/_projects/oneinch/bnb/project/oneinch_bnb_project_swaps.sql index cda7a0bab41..8be6c746863 100644 --- a/dex/models/_projects/oneinch/bnb/project/oneinch_bnb_project_swaps.sql +++ b/daily_spellbook/models/_projects/oneinch/bnb/project/oneinch_bnb_project_swaps.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders') }} {{ diff --git a/dex/models/_projects/oneinch/ethereum/_meta/oneinch_ethereum_mapped_contracts.sql b/daily_spellbook/models/_projects/oneinch/ethereum/_meta/oneinch_ethereum_mapped_contracts.sql similarity index 100% rename from dex/models/_projects/oneinch/ethereum/_meta/oneinch_ethereum_mapped_contracts.sql rename to daily_spellbook/models/_projects/oneinch/ethereum/_meta/oneinch_ethereum_mapped_contracts.sql diff --git a/dex/models/_projects/oneinch/ethereum/_meta/oneinch_ethereum_mapped_methods.sql b/daily_spellbook/models/_projects/oneinch/ethereum/_meta/oneinch_ethereum_mapped_methods.sql similarity index 100% rename from dex/models/_projects/oneinch/ethereum/_meta/oneinch_ethereum_mapped_methods.sql rename to daily_spellbook/models/_projects/oneinch/ethereum/_meta/oneinch_ethereum_mapped_methods.sql diff --git a/dex/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_calls.sql b/daily_spellbook/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_calls.sql similarity index 88% rename from dex/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_calls.sql rename to daily_spellbook/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_calls.sql index 1c569f7bbad..ba4b19ccef8 100644 --- a/dex/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_calls.sql +++ b/daily_spellbook/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_calls.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_mapped_contracts') }} {{ diff --git a/dex/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders.sql b/daily_spellbook/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders.sql similarity index 78% rename from dex/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders.sql rename to daily_spellbook/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders.sql index 523448509ff..7eaa6835fde 100644 --- a/dex/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders.sql +++ b/daily_spellbook/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders.sql @@ -15,6 +15,8 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_logs') }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_traces') }} {{ diff --git a/dex/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders_raw_logs.sql b/daily_spellbook/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders_raw_logs.sql similarity index 100% rename from dex/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders_raw_logs.sql rename to daily_spellbook/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders_raw_logs.sql diff --git a/dex/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders_raw_traces.sql b/daily_spellbook/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders_raw_traces.sql similarity index 100% rename from dex/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders_raw_traces.sql rename to daily_spellbook/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_orders_raw_traces.sql diff --git a/dex/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_swaps.sql b/daily_spellbook/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_swaps.sql similarity index 88% rename from dex/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_swaps.sql rename to daily_spellbook/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_swaps.sql index ce18756de7a..1779a3853a1 100644 --- a/dex/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_swaps.sql +++ b/daily_spellbook/models/_projects/oneinch/ethereum/project/oneinch_ethereum_project_swaps.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders') }} {{ diff --git a/dex/models/_projects/oneinch/fantom/_meta/oneinch_fantom_mapped_contracts.sql b/daily_spellbook/models/_projects/oneinch/fantom/_meta/oneinch_fantom_mapped_contracts.sql similarity index 100% rename from dex/models/_projects/oneinch/fantom/_meta/oneinch_fantom_mapped_contracts.sql rename to daily_spellbook/models/_projects/oneinch/fantom/_meta/oneinch_fantom_mapped_contracts.sql diff --git a/dex/models/_projects/oneinch/fantom/_meta/oneinch_fantom_mapped_methods.sql b/daily_spellbook/models/_projects/oneinch/fantom/_meta/oneinch_fantom_mapped_methods.sql similarity index 100% rename from dex/models/_projects/oneinch/fantom/_meta/oneinch_fantom_mapped_methods.sql rename to daily_spellbook/models/_projects/oneinch/fantom/_meta/oneinch_fantom_mapped_methods.sql diff --git a/dex/models/_projects/oneinch/fantom/project/oneinch_fantom_project_calls.sql b/daily_spellbook/models/_projects/oneinch/fantom/project/oneinch_fantom_project_calls.sql similarity index 88% rename from dex/models/_projects/oneinch/fantom/project/oneinch_fantom_project_calls.sql rename to daily_spellbook/models/_projects/oneinch/fantom/project/oneinch_fantom_project_calls.sql index 73caf1173c6..4bcf53ac9fa 100644 --- a/dex/models/_projects/oneinch/fantom/project/oneinch_fantom_project_calls.sql +++ b/daily_spellbook/models/_projects/oneinch/fantom/project/oneinch_fantom_project_calls.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_mapped_contracts') }} {{ diff --git a/dex/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders.sql b/daily_spellbook/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders.sql similarity index 77% rename from dex/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders.sql rename to daily_spellbook/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders.sql index 956995624a7..e40f4881922 100644 --- a/dex/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders.sql +++ b/daily_spellbook/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders.sql @@ -15,6 +15,8 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_logs') }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_traces') }} {{ diff --git a/dex/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders_raw_logs.sql b/daily_spellbook/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders_raw_logs.sql similarity index 100% rename from dex/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders_raw_logs.sql rename to daily_spellbook/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders_raw_logs.sql diff --git a/dex/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders_raw_traces.sql b/daily_spellbook/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders_raw_traces.sql similarity index 100% rename from dex/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders_raw_traces.sql rename to daily_spellbook/models/_projects/oneinch/fantom/project/oneinch_fantom_project_orders_raw_traces.sql diff --git a/dex/models/_projects/oneinch/fantom/project/oneinch_fantom_project_swaps.sql b/daily_spellbook/models/_projects/oneinch/fantom/project/oneinch_fantom_project_swaps.sql similarity index 88% rename from dex/models/_projects/oneinch/fantom/project/oneinch_fantom_project_swaps.sql rename to daily_spellbook/models/_projects/oneinch/fantom/project/oneinch_fantom_project_swaps.sql index cc21fa718aa..b6fb84a3e63 100644 --- a/dex/models/_projects/oneinch/fantom/project/oneinch_fantom_project_swaps.sql +++ b/daily_spellbook/models/_projects/oneinch/fantom/project/oneinch_fantom_project_swaps.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders') }} {{ diff --git a/dex/models/_projects/oneinch/gnosis/_meta/oneinch_gnosis_mapped_contracts.sql b/daily_spellbook/models/_projects/oneinch/gnosis/_meta/oneinch_gnosis_mapped_contracts.sql similarity index 100% rename from dex/models/_projects/oneinch/gnosis/_meta/oneinch_gnosis_mapped_contracts.sql rename to daily_spellbook/models/_projects/oneinch/gnosis/_meta/oneinch_gnosis_mapped_contracts.sql diff --git a/dex/models/_projects/oneinch/gnosis/_meta/oneinch_gnosis_mapped_methods.sql b/daily_spellbook/models/_projects/oneinch/gnosis/_meta/oneinch_gnosis_mapped_methods.sql similarity index 100% rename from dex/models/_projects/oneinch/gnosis/_meta/oneinch_gnosis_mapped_methods.sql rename to daily_spellbook/models/_projects/oneinch/gnosis/_meta/oneinch_gnosis_mapped_methods.sql diff --git a/dex/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_calls.sql b/daily_spellbook/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_calls.sql similarity index 88% rename from dex/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_calls.sql rename to daily_spellbook/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_calls.sql index 1e16a2a37d4..79fcb9ec9aa 100644 --- a/dex/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_calls.sql +++ b/daily_spellbook/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_calls.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_mapped_contracts') }} {{ diff --git a/dex/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders.sql b/daily_spellbook/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders.sql similarity index 77% rename from dex/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders.sql rename to daily_spellbook/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders.sql index 4ab6165bcee..1fd9e3d2b46 100644 --- a/dex/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders.sql +++ b/daily_spellbook/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders.sql @@ -15,6 +15,8 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_logs') }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_traces') }} {{ diff --git a/dex/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders_raw_logs.sql b/daily_spellbook/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders_raw_logs.sql similarity index 100% rename from dex/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders_raw_logs.sql rename to daily_spellbook/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders_raw_logs.sql diff --git a/dex/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders_raw_traces.sql b/daily_spellbook/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders_raw_traces.sql similarity index 100% rename from dex/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders_raw_traces.sql rename to daily_spellbook/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_orders_raw_traces.sql diff --git a/dex/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_swaps.sql b/daily_spellbook/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_swaps.sql similarity index 88% rename from dex/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_swaps.sql rename to daily_spellbook/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_swaps.sql index 522d0483f5a..b03eb32dd47 100644 --- a/dex/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_swaps.sql +++ b/daily_spellbook/models/_projects/oneinch/gnosis/project/oneinch_gnosis_project_swaps.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders') }} {{ diff --git a/dex/models/_projects/oneinch/oneinch_project_orders.sql b/daily_spellbook/models/_projects/oneinch/oneinch_project_orders.sql similarity index 94% rename from dex/models/_projects/oneinch/oneinch_project_orders.sql rename to daily_spellbook/models/_projects/oneinch/oneinch_project_orders.sql index 334edc18fa4..d933422edd9 100644 --- a/dex/models/_projects/oneinch/oneinch_project_orders.sql +++ b/daily_spellbook/models/_projects/oneinch/oneinch_project_orders.sql @@ -44,7 +44,7 @@ meta as ( blockchain , wrapped_native_token_address , native_token_symbol as native_symbol - from {{ ref('oneinch_blockchains') }} + from {{ source('oneinch', 'blockchains') }} ) , orders as ( @@ -57,7 +57,9 @@ meta as ( , date_trunc('minute', block_time) as minute , row_number() over(partition by blockchain, block_number, tx_hash order by call_trace_address, order_hash) as counter from ( - {% for blockchain in oneinch_exposed_blockchains_list() %} + {% for blockchain in oneinch_project_swaps_exposed_blockchains_list() %} + {{ "-- depends_on: {{ ref('oneinch_' + blockchain + '_project_swaps') }}" }} + select {{ orders_base_columns | join(', ') }} , tag @@ -83,7 +85,7 @@ meta as ( , null as order_deadline , 1 as call_trade , 1 as call_trades - from {{ ref('oneinch_lop') }} + from {{ source('oneinch', 'lop') }} where call_success ) join meta using(blockchain) diff --git a/dex/models/_projects/oneinch/oneinch_project_swaps.sql b/daily_spellbook/models/_projects/oneinch/oneinch_project_swaps.sql similarity index 68% rename from dex/models/_projects/oneinch/oneinch_project_swaps.sql rename to daily_spellbook/models/_projects/oneinch/oneinch_project_swaps.sql index fb1169899c0..995181a9a89 100644 --- a/dex/models/_projects/oneinch/oneinch_project_swaps.sql +++ b/daily_spellbook/models/_projects/oneinch/oneinch_project_swaps.sql @@ -9,7 +9,9 @@ -{% for blockchain in oneinch_exposed_blockchains_list() %} +{% for blockchain in oneinch_project_swaps_exposed_blockchains_list() %} + {{ "-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders') }}" }} + select * from {{ ref('oneinch_' + blockchain + '_project_swaps') }} {% if not loop.last %} union all {% endif %} {% endfor %} \ No newline at end of file diff --git a/dex/models/_projects/oneinch/optimism/_meta/oneinch_optimism_mapped_contracts.sql b/daily_spellbook/models/_projects/oneinch/optimism/_meta/oneinch_optimism_mapped_contracts.sql similarity index 100% rename from dex/models/_projects/oneinch/optimism/_meta/oneinch_optimism_mapped_contracts.sql rename to daily_spellbook/models/_projects/oneinch/optimism/_meta/oneinch_optimism_mapped_contracts.sql diff --git a/dex/models/_projects/oneinch/optimism/_meta/oneinch_optimism_mapped_methods.sql b/daily_spellbook/models/_projects/oneinch/optimism/_meta/oneinch_optimism_mapped_methods.sql similarity index 100% rename from dex/models/_projects/oneinch/optimism/_meta/oneinch_optimism_mapped_methods.sql rename to daily_spellbook/models/_projects/oneinch/optimism/_meta/oneinch_optimism_mapped_methods.sql diff --git a/dex/models/_projects/oneinch/optimism/project/oneinch_optimism_project_calls.sql b/daily_spellbook/models/_projects/oneinch/optimism/project/oneinch_optimism_project_calls.sql similarity index 88% rename from dex/models/_projects/oneinch/optimism/project/oneinch_optimism_project_calls.sql rename to daily_spellbook/models/_projects/oneinch/optimism/project/oneinch_optimism_project_calls.sql index 461d4f3b7d2..dfb913b41e5 100644 --- a/dex/models/_projects/oneinch/optimism/project/oneinch_optimism_project_calls.sql +++ b/daily_spellbook/models/_projects/oneinch/optimism/project/oneinch_optimism_project_calls.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_mapped_contracts') }} {{ diff --git a/dex/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders.sql b/daily_spellbook/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders.sql similarity index 78% rename from dex/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders.sql rename to daily_spellbook/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders.sql index a75952d836b..5e3fbe11151 100644 --- a/dex/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders.sql +++ b/daily_spellbook/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders.sql @@ -15,6 +15,8 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_logs') }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_traces') }} {{ diff --git a/dex/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders_raw_logs.sql b/daily_spellbook/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders_raw_logs.sql similarity index 100% rename from dex/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders_raw_logs.sql rename to daily_spellbook/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders_raw_logs.sql diff --git a/dex/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders_raw_traces.sql b/daily_spellbook/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders_raw_traces.sql similarity index 100% rename from dex/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders_raw_traces.sql rename to daily_spellbook/models/_projects/oneinch/optimism/project/oneinch_optimism_project_orders_raw_traces.sql diff --git a/dex/models/_projects/oneinch/optimism/project/oneinch_optimism_project_swaps.sql b/daily_spellbook/models/_projects/oneinch/optimism/project/oneinch_optimism_project_swaps.sql similarity index 88% rename from dex/models/_projects/oneinch/optimism/project/oneinch_optimism_project_swaps.sql rename to daily_spellbook/models/_projects/oneinch/optimism/project/oneinch_optimism_project_swaps.sql index d9b13c84eb9..0461bda2209 100644 --- a/dex/models/_projects/oneinch/optimism/project/oneinch_optimism_project_swaps.sql +++ b/daily_spellbook/models/_projects/oneinch/optimism/project/oneinch_optimism_project_swaps.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders') }} {{ diff --git a/dex/models/_projects/oneinch/polygon/_meta/oneinch_polygon_mapped_contracts.sql b/daily_spellbook/models/_projects/oneinch/polygon/_meta/oneinch_polygon_mapped_contracts.sql similarity index 100% rename from dex/models/_projects/oneinch/polygon/_meta/oneinch_polygon_mapped_contracts.sql rename to daily_spellbook/models/_projects/oneinch/polygon/_meta/oneinch_polygon_mapped_contracts.sql diff --git a/dex/models/_projects/oneinch/polygon/_meta/oneinch_polygon_mapped_methods.sql b/daily_spellbook/models/_projects/oneinch/polygon/_meta/oneinch_polygon_mapped_methods.sql similarity index 100% rename from dex/models/_projects/oneinch/polygon/_meta/oneinch_polygon_mapped_methods.sql rename to daily_spellbook/models/_projects/oneinch/polygon/_meta/oneinch_polygon_mapped_methods.sql diff --git a/dex/models/_projects/oneinch/polygon/project/oneinch_polygon_project_calls.sql b/daily_spellbook/models/_projects/oneinch/polygon/project/oneinch_polygon_project_calls.sql similarity index 88% rename from dex/models/_projects/oneinch/polygon/project/oneinch_polygon_project_calls.sql rename to daily_spellbook/models/_projects/oneinch/polygon/project/oneinch_polygon_project_calls.sql index cedb4fb0901..59f88882289 100644 --- a/dex/models/_projects/oneinch/polygon/project/oneinch_polygon_project_calls.sql +++ b/daily_spellbook/models/_projects/oneinch/polygon/project/oneinch_polygon_project_calls.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_mapped_contracts') }} {{ diff --git a/dex/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders.sql b/daily_spellbook/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders.sql similarity index 78% rename from dex/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders.sql rename to daily_spellbook/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders.sql index 3cc6deb52d2..0d3d6f4e7e3 100644 --- a/dex/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders.sql +++ b/daily_spellbook/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders.sql @@ -15,6 +15,8 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_logs') }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_traces') }} {{ diff --git a/dex/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders_raw_logs.sql b/daily_spellbook/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders_raw_logs.sql similarity index 100% rename from dex/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders_raw_logs.sql rename to daily_spellbook/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders_raw_logs.sql diff --git a/dex/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders_raw_traces.sql b/daily_spellbook/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders_raw_traces.sql similarity index 100% rename from dex/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders_raw_traces.sql rename to daily_spellbook/models/_projects/oneinch/polygon/project/oneinch_polygon_project_orders_raw_traces.sql diff --git a/dex/models/_projects/oneinch/polygon/project/oneinch_polygon_project_swaps.sql b/daily_spellbook/models/_projects/oneinch/polygon/project/oneinch_polygon_project_swaps.sql similarity index 88% rename from dex/models/_projects/oneinch/polygon/project/oneinch_polygon_project_swaps.sql rename to daily_spellbook/models/_projects/oneinch/polygon/project/oneinch_polygon_project_swaps.sql index 6f1e098e8e9..cad23109e7c 100644 --- a/dex/models/_projects/oneinch/polygon/project/oneinch_polygon_project_swaps.sql +++ b/daily_spellbook/models/_projects/oneinch/polygon/project/oneinch_polygon_project_swaps.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders') }} {{ diff --git a/dex/models/_projects/oneinch/zksync/_meta/oneinch_zksync_mapped_contracts.sql b/daily_spellbook/models/_projects/oneinch/zksync/_meta/oneinch_zksync_mapped_contracts.sql similarity index 100% rename from dex/models/_projects/oneinch/zksync/_meta/oneinch_zksync_mapped_contracts.sql rename to daily_spellbook/models/_projects/oneinch/zksync/_meta/oneinch_zksync_mapped_contracts.sql diff --git a/dex/models/_projects/oneinch/zksync/_meta/oneinch_zksync_mapped_methods.sql b/daily_spellbook/models/_projects/oneinch/zksync/_meta/oneinch_zksync_mapped_methods.sql similarity index 100% rename from dex/models/_projects/oneinch/zksync/_meta/oneinch_zksync_mapped_methods.sql rename to daily_spellbook/models/_projects/oneinch/zksync/_meta/oneinch_zksync_mapped_methods.sql diff --git a/dex/models/_projects/oneinch/zksync/project/oneinch_zksync_project_calls.sql b/daily_spellbook/models/_projects/oneinch/zksync/project/oneinch_zksync_project_calls.sql similarity index 88% rename from dex/models/_projects/oneinch/zksync/project/oneinch_zksync_project_calls.sql rename to daily_spellbook/models/_projects/oneinch/zksync/project/oneinch_zksync_project_calls.sql index 01091d61d0c..9e818b4c995 100644 --- a/dex/models/_projects/oneinch/zksync/project/oneinch_zksync_project_calls.sql +++ b/daily_spellbook/models/_projects/oneinch/zksync/project/oneinch_zksync_project_calls.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_mapped_contracts') }} {{ diff --git a/dex/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders.sql b/daily_spellbook/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders.sql similarity index 77% rename from dex/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders.sql rename to daily_spellbook/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders.sql index 93d3264fdef..b30e9a46d19 100644 --- a/dex/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders.sql +++ b/daily_spellbook/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders.sql @@ -15,6 +15,8 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_logs') }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders_raw_traces') }} {{ diff --git a/dex/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders_raw_logs.sql b/daily_spellbook/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders_raw_logs.sql similarity index 100% rename from dex/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders_raw_logs.sql rename to daily_spellbook/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders_raw_logs.sql diff --git a/dex/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders_raw_traces.sql b/daily_spellbook/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders_raw_traces.sql similarity index 100% rename from dex/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders_raw_traces.sql rename to daily_spellbook/models/_projects/oneinch/zksync/project/oneinch_zksync_project_orders_raw_traces.sql diff --git a/dex/models/_projects/oneinch/zksync/project/oneinch_zksync_project_swaps.sql b/daily_spellbook/models/_projects/oneinch/zksync/project/oneinch_zksync_project_swaps.sql similarity index 88% rename from dex/models/_projects/oneinch/zksync/project/oneinch_zksync_project_swaps.sql rename to daily_spellbook/models/_projects/oneinch/zksync/project/oneinch_zksync_project_swaps.sql index db6d4809a23..11083c19f79 100644 --- a/dex/models/_projects/oneinch/zksync/project/oneinch_zksync_project_swaps.sql +++ b/daily_spellbook/models/_projects/oneinch/zksync/project/oneinch_zksync_project_swaps.sql @@ -15,6 +15,7 @@ ) }} +-- depends_on: {{ ref('oneinch_' + blockchain + '_project_orders') }} {{ diff --git a/sources/oneinch/oneinch_sources.yml b/sources/oneinch/oneinch_sources.yml new file mode 100644 index 00000000000..785156e53fb --- /dev/null +++ b/sources/oneinch/oneinch_sources.yml @@ -0,0 +1,9 @@ +version: 2 + +sources: + - name: oneinch + tables: + - name: blockchains + - name: lop + - name: parsed_transfers_from_calls + \ No newline at end of file