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

Add OpenSea Blast trades #6253

Merged
merged 4 commits into from
Jun 26, 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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
{% set nft_models = [
ref('fantasy_blast_base_trades')
, ref('blur_blast_base_trades')
, ref('opensea_v4_blast_base_trades')
] %}


Expand Down
14 changes: 14 additions & 0 deletions nft/models/_sector/trades/chains/blast/platforms/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,17 @@ models:
- check_columns_nft_base_trades
- dbt_utils.unique_combination_of_columns:
combination_of_columns: ['block_number','tx_hash','sub_tx_trade_id']

- name: opensea_v4_blast_base_trades
meta:
blockchain: blast
sector: nft
project: opensea
contributors: hildobby
config:
tags: ['blast', 'nft', 'trades', 'opensea']
description: "OpenSea on blast base trades"
tests:
- check_columns_nft_base_trades
- dbt_utils.unique_combination_of_columns:
combination_of_columns: ['block_number','tx_hash','sub_tx_trade_id']
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{ config(
schema = 'opensea_v4_blast',
alias = 'base_trades',

materialized = 'incremental',
file_format = 'delta',
incremental_strategy = 'merge',
unique_key = ['block_number', 'tx_hash', 'sub_tx_trade_id']
)
}}

WITH fee_wallets as (
select wallet_address, wallet_name from (
values (0x0000a26b00c1f0df003000390027140000faa719,'opensea')
) as foo(wallet_address, wallet_name)
)

, trades as (
{{ seaport_v4_trades(
blockchain = 'blast'
,source_transactions = source('blast','transactions')
,Seaport_evt_OrderFulfilled = source('seaport_blast','Seaport_evt_OrderFulfilled')
,Seaport_evt_OrdersMatched = source('seaport_blast','Seaport_evt_OrdersMatched')
,fee_wallet_list_cte = 'fee_wallets'
,start_date = '2024-03-21'
,native_currency_contract = '0x4200000000000000000000000000000000000006'
)
}}
)

select *
from trades
where ( fee_wallet_name = 'opensea'
or right_hash = 0x360c6ebe
)
25 changes: 25 additions & 0 deletions sources/seaport/blast/seaport_blast_sources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2

sources:
- name: seaport_blast
freshness:
warn_after: { count: 24, period: hour }
tables:
- name: Seaport_evt_OrderFulfilled
loaded_at_field: evt_block_time
- name: Seaport_evt_OrdersMatched
loaded_at_field: evt_block_time
- name: Seaport_call_fulfillAvailableAdvancedOrders
loaded_at_field: call_block_time
- name: Seaport_call_fulfillOrder
loaded_at_field: call_block_time
- name: Seaport_call_fulfillBasicOrder
loaded_at_field: call_block_time
- name: Seaport_call_matchAdvancedOrders
loaded_at_field: call_block_time
- name: Seaport_call_fulfillAdvancedOrder
loaded_at_field: call_block_time
- name: Seaport_call_fulfillAvailableOrders
loaded_at_field: call_block_time
- name: Seaport_call_matchOrders
loaded_at_field: call_block_time
Loading