Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reconcille Seaport forks macros #6548

Merged
merged 6 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
722 changes: 0 additions & 722 deletions dbt_subprojects/nft/macros/platforms/seaport_v3_fork_trades.sql

This file was deleted.

15 changes: 9 additions & 6 deletions dbt_subprojects/nft/macros/platforms/seaport_v3_trades.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
,fee_wallet_list_cte
,start_date = '2023-02-01'
,native_currency_contract = '0x0000000000000000000000000000000000000000'
,seaport_fork_address = '0x00000000006c3852cbef3e08e8df289169ede581'
,project = 'opensea'
,version = 'v3'
) %}

with source_ethereum_transactions as (
Expand Down Expand Up @@ -81,7 +84,7 @@ with source_ethereum_transactions as (
, offer_item
from {{ Seaport_evt_OrderFulfilled }}
cross join unnest(offer) with ordinality as foo(offer_item, offer_idx)
where contract_address = 0x00000000006c3852cbef3e08e8df289169ede581 -- seaport v1.1
where contract_address = {{ seaport_fork_address }} -- seaport v1.1
and recipient != 0x0000000000000000000000000000000000000000
{% if not is_incremental() %}
and evt_block_time >= TIMESTAMP '{{start_date}}' -- seaport first txn
Expand Down Expand Up @@ -148,7 +151,7 @@ with source_ethereum_transactions as (
, consideration_idx
from {{ Seaport_evt_OrderFulfilled }}
cross join unnest(consideration) with ordinality as foo(consideration_item,consideration_idx)
where contract_address = 0x00000000006c3852cbef3e08e8df289169ede581 -- Seaport v1.1
where contract_address = {{ seaport_fork_address }} -- Seaport v1.1
and recipient != 0x0000000000000000000000000000000000000000
{% if not is_incremental() %}
and evt_block_time >= TIMESTAMP '{{start_date}}' -- seaport first txn
Expand Down Expand Up @@ -226,7 +229,7 @@ with source_ethereum_transactions as (
from {{ Seaport_call_matchAdvancedOrders }}
cross join unnest(output_executions) with ordinality as foo(execution,execution_idx)
where call_success
and contract_address = 0x00000000006c3852cbef3e08e8df289169ede581 -- Seaport v1.1
and contract_address = {{ seaport_fork_address }} -- Seaport v1.1
{% if not is_incremental() %}
and call_block_time >= timestamp '{{start_date}}' -- seaport first txn
{% else %}
Expand Down Expand Up @@ -255,7 +258,7 @@ with source_ethereum_transactions as (
from {{ Seaport_call_matchOrders }}
cross join unnest(output_executions) with ordinality as foo(execution,execution_idx)
where call_success
and contract_address = 0x00000000006c3852cbef3e08e8df289169ede581 -- Seaport v1.1
and contract_address = {{ seaport_fork_address }} -- Seaport v1.1
{% if not is_incremental() %}
and call_block_time >= timestamp '{{start_date}}' -- seaport first txn
{% else %}
Expand Down Expand Up @@ -576,8 +579,8 @@ with source_ethereum_transactions as (
select
-- basic info
'{{blockchain}}' as blockchain
,'opensea' as project
,'v3' as project_version
,'{{project}}' as project
,'{{version}}' as project_version

-- order info
,block_time
Expand Down
Loading
Loading