Skip to content

Commit

Permalink
try sourcing
Browse files Browse the repository at this point in the history
  • Loading branch information
grkhr committed Jun 19, 2024
1 parent 2109016 commit 7a609e8
Show file tree
Hide file tree
Showing 13 changed files with 87 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% macro
oneinch_project_calls_macro(
blockchain
, date_from = '2024-06-01'
, date_from = '2024-06-18'
)
%}

Expand Down Expand Up @@ -31,7 +31,7 @@ static as (
, any_value(project) as project
, any_value(tag) as tag
, any_value(flags) as flags
from {{ ref('oneinch_' + blockchain + '_mapped_contracts') }}
from {{ source('oneinch_' + blockchain, 'mapped_contracts') }}
where
project not in ('MEVBot', 'Unknown')
group by 1, 2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% macro oneinch_project_orders_macro(
blockchain
, date_from = '2024-06-01'
, date_from = '2024-06-18'
)%}

-- EVENTS CONFIG
Expand Down Expand Up @@ -787,7 +787,7 @@ logs as (
from {{ source(blockchain, 'traces') }}
join (
select *, address as "to"
from {{ ref('oneinch_' + blockchain + '_mapped_contracts') }}
from {{ source('oneinch_' + blockchain, 'mapped_contracts') }}
where
blockchain = '{{ blockchain }}'
and '{{ project }}' in (project, tag)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% macro
oneinch_project_swaps_macro(
blockchain
, date_from = '2024-06-01'
, date_from = '2024-06-18'
)
%}

Expand Down Expand Up @@ -32,7 +32,7 @@ meta as (
, taker_asset
, taking_amount
, flags as order_flags
from {{ ref('oneinch_' + blockchain + '_project_orders') }}
from {{ source('oneinch_' + blockchain, 'project_orders') }}
where
{% if is_incremental() %}
{{ incremental_predicate('block_time') }}
Expand All @@ -57,7 +57,7 @@ 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_' + blockchain, 'lop') }}
where
{% if is_incremental() %}
{{ incremental_predicate('block_time') }}
Expand Down
10 changes: 9 additions & 1 deletion sources/oneinch/arbitrum/oneinch_arbitrum_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,12 @@ sources:
- name: AggregationRouterV6_call_fillContractOrder
loaded_at_field: call_block_time
- name: AggregationRouterV6_call_fillContractOrderArgs
loaded_at_field: call_block_time
loaded_at_field: call_block_time
- name: mapped_contracts
- name: project_orders
loaded_at_field: block_time
- name: project_calls
loaded_at_field: block_time
- name: lop
loaded_at_field: block_time

9 changes: 8 additions & 1 deletion sources/oneinch/avalanche_c/oneinch_avalanche_c_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,11 @@ sources:
- name: AggregationRouterV6_call_fillContractOrder
loaded_at_field: call_block_time
- name: AggregationRouterV6_call_fillContractOrderArgs
loaded_at_field: call_block_time
loaded_at_field: call_block_time
- name: mapped_contracts
- name: project_orders
loaded_at_field: block_time
- name: project_calls
loaded_at_field: block_time
- name: lop
loaded_at_field: block_time
9 changes: 8 additions & 1 deletion sources/oneinch/base/oneinch_base_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,11 @@ sources:
- name: AggregationRouterV6_call_fillContractOrder
loaded_at_field: call_block_time
- name: AggregationRouterV6_call_fillContractOrderArgs
loaded_at_field: call_block_time
loaded_at_field: call_block_time
- name: mapped_contracts
- name: project_orders
loaded_at_field: block_time
- name: project_calls
loaded_at_field: block_time
- name: lop
loaded_at_field: block_time
9 changes: 8 additions & 1 deletion sources/oneinch/bnb/oneinch_bnb_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,11 @@ sources:
- name: AggregationRouterV6_call_fillContractOrder
loaded_at_field: call_block_time
- name: AggregationRouterV6_call_fillContractOrderArgs
loaded_at_field: call_block_time
loaded_at_field: call_block_time
- name: mapped_contracts
- name: project_orders
loaded_at_field: block_time
- name: project_calls
loaded_at_field: block_time
- name: lop
loaded_at_field: block_time
7 changes: 7 additions & 0 deletions sources/oneinch/ethereum/oneinch_ethereum_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ sources:
loaded_at_field: call_block_time
- name: AggregationRouterV6_call_fillContractOrderArgs
loaded_at_field: call_block_time
- name: mapped_contracts
- name: project_orders
loaded_at_field: block_time
- name: project_calls
loaded_at_field: block_time
- name: lop
loaded_at_field: block_time


- name: onesplit_ethereum
Expand Down
9 changes: 8 additions & 1 deletion sources/oneinch/fantom/oneinch_fantom_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,11 @@ sources:
- name: AggregationRouterV6_call_fillContractOrder
loaded_at_field: call_block_time
- name: AggregationRouterV6_call_fillContractOrderArgs
loaded_at_field: call_block_time
loaded_at_field: call_block_time
- name: mapped_contracts
- name: project_orders
loaded_at_field: block_time
- name: project_calls
loaded_at_field: block_time
- name: lop
loaded_at_field: block_time
9 changes: 8 additions & 1 deletion sources/oneinch/gnosis/oneinch_gnosis_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,11 @@ sources:
- name: AggregationRouterV6_call_fillContractOrder
loaded_at_field: call_block_time
- name: AggregationRouterV6_call_fillContractOrderArgs
loaded_at_field: call_block_time
loaded_at_field: call_block_time
- name: mapped_contracts
- name: project_orders
loaded_at_field: block_time
- name: project_calls
loaded_at_field: block_time
- name: lop
loaded_at_field: block_time
9 changes: 8 additions & 1 deletion sources/oneinch/optimism/oneinch_optimism_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,11 @@ sources:
- name: AggregationRouterV6_call_fillContractOrder
loaded_at_field: call_block_time
- name: AggregationRouterV6_call_fillContractOrderArgs
loaded_at_field: call_block_time
loaded_at_field: call_block_time
- name: mapped_contracts
- name: project_orders
loaded_at_field: block_time
- name: project_calls
loaded_at_field: block_time
- name: lop
loaded_at_field: block_time
9 changes: 8 additions & 1 deletion sources/oneinch/polygon/oneinch_polygon_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,11 @@ sources:
- name: AggregationRouterV6_call_fillContractOrder
loaded_at_field: call_block_time
- name: AggregationRouterV6_call_fillContractOrderArgs
loaded_at_field: call_block_time
loaded_at_field: call_block_time
- name: mapped_contracts
- name: project_orders
loaded_at_field: block_time
- name: project_calls
loaded_at_field: block_time
- name: lop
loaded_at_field: block_time
9 changes: 8 additions & 1 deletion sources/oneinch/zksync/oneinch_zksync_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,11 @@ sources:
- name: AggregationRouterV6_call_fillContractOrder
loaded_at_field: call_block_time
- name: AggregationRouterV6_call_fillContractOrderArgs
loaded_at_field: call_block_time
loaded_at_field: call_block_time
- name: mapped_contracts
- name: project_orders
loaded_at_field: block_time
- name: project_calls
loaded_at_field: block_time
- name: lop
loaded_at_field: block_time

0 comments on commit 7a609e8

Please sign in to comment.