forked from duneanalytics/spellbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Thruster Dex Trades Blast - Ready for review (duneanalytics#6193)
* Add Uniswap Blast (V2 & V3) * fix seed naming * push * Update tests * trigger rerun * smol fix * Add Thruster Blast Dex Trades * fix typo * add schema for seed file * update seed and x (formerly twitter) username * fix version
- Loading branch information
1 parent
eda823e
commit 2dd53e4
Showing
7 changed files
with
157 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
dex/models/trades/blast/platforms/thruster_blast_base_trades.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
{{ | ||
config( | ||
schema = 'thruster_blast', | ||
alias = 'base_trades', | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
unique_key = ['tx_hash', 'evt_index'], | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')] | ||
) | ||
}} | ||
|
||
WITH | ||
|
||
dexs_v1_30bps AS ( | ||
{{ | ||
uniswap_compatible_v2_trades( | ||
blockchain = 'blast', | ||
project = 'thruster', | ||
version = 'UNI-V2-30bps', | ||
Pair_evt_Swap = source('thruster_blast', 'ThrusterPair_V2_Point_3_Fee_evt_Swap'), | ||
Factory_evt_PairCreated = source('thruster_blast', 'ThrusterFactory_Point_3_Fee_evt_PairCreated') | ||
) | ||
}} | ||
), | ||
|
||
dexs_v1_100bps AS ( | ||
{{ | ||
uniswap_compatible_v2_trades( | ||
blockchain = 'blast', | ||
project = 'thruster', | ||
version = 'UNI-V2-100bps', | ||
Pair_evt_Swap = source('thruster_blast', 'ThrusterPair_V2_1_Fee_evt_Swap'), | ||
Factory_evt_PairCreated = source('thruster_blast', 'ThrusterFactory_1_Fee_evt_PairCreated') | ||
) | ||
}} | ||
), | ||
|
||
dexs_v1_univ3 AS ( | ||
{{ | ||
uniswap_compatible_v3_trades( | ||
blockchain = 'blast' | ||
, project = 'thruster' | ||
, version = 'UNI-V3' | ||
, Pair_evt_Swap = source('thruster_blast', 'ThrusterPool_V3_Point_3_Fee_evt_Swap') | ||
, Factory_evt_PoolCreated = source('thruster_blast', 'ThrusterPoolFactory_evt_PoolCreated') | ||
) | ||
}} | ||
) | ||
|
||
SELECT | ||
dexs_v1_30bps.blockchain, | ||
dexs_v1_30bps.project, | ||
dexs_v1_30bps.version, | ||
dexs_v1_30bps.block_month, | ||
dexs_v1_30bps.block_date, | ||
dexs_v1_30bps.block_time, | ||
dexs_v1_30bps.block_number, | ||
dexs_v1_30bps.token_bought_amount_raw, | ||
dexs_v1_30bps.token_sold_amount_raw, | ||
dexs_v1_30bps.token_bought_address, | ||
dexs_v1_30bps.token_sold_address, | ||
dexs_v1_30bps.taker, | ||
dexs_v1_30bps.maker, | ||
dexs_v1_30bps.project_contract_address, | ||
dexs_v1_30bps.tx_hash, | ||
dexs_v1_30bps.evt_index | ||
FROM dexs_v1_30bps | ||
UNION ALL | ||
SELECT | ||
dexs_v1_100bps.blockchain, | ||
dexs_v1_100bps.project, | ||
dexs_v1_100bps.version, | ||
dexs_v1_100bps.block_month, | ||
dexs_v1_100bps.block_date, | ||
dexs_v1_100bps.block_time, | ||
dexs_v1_100bps.block_number, | ||
dexs_v1_100bps.token_bought_amount_raw, | ||
dexs_v1_100bps.token_sold_amount_raw, | ||
dexs_v1_100bps.token_bought_address, | ||
dexs_v1_100bps.token_sold_address, | ||
dexs_v1_100bps.taker, | ||
dexs_v1_100bps.maker, | ||
dexs_v1_100bps.project_contract_address, | ||
dexs_v1_100bps.tx_hash, | ||
dexs_v1_100bps.evt_index | ||
FROM dexs_v1_100bps | ||
UNION ALL | ||
SELECT | ||
dexs_v1_univ3.blockchain, | ||
dexs_v1_univ3.project, | ||
dexs_v1_univ3.version, | ||
dexs_v1_univ3.block_month, | ||
dexs_v1_univ3.block_date, | ||
dexs_v1_univ3.block_time, | ||
dexs_v1_univ3.block_number, | ||
dexs_v1_univ3.token_bought_amount_raw, | ||
dexs_v1_univ3.token_sold_amount_raw, | ||
dexs_v1_univ3.token_bought_address, | ||
dexs_v1_univ3.token_sold_address, | ||
dexs_v1_univ3.taker, | ||
dexs_v1_univ3.maker, | ||
dexs_v1_univ3.project_contract_address, | ||
dexs_v1_univ3.tx_hash, | ||
dexs_v1_univ3.evt_index | ||
FROM dexs_v1_univ3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
blockchain,project,version,block_date,tx_hash,evt_index,token_bought_address,token_sold_address,block_number,token_bought_amount_raw,token_sold_amount_raw | ||
blast,thruster,UNI-V2-100bps,2024-02-29,0x484f21348695db7d35c558d259c7caff8fe6d8ff358d084392205d5d7ac8cece,73,0x4300000000000000000000000000000000000004,0x44a2f2303933e71e5fa779ce463c7d71607e968a,204201,87453,540044297484934 | ||
blast,thruster,UNI-V2-100bps,2024-03-02,0x22a3cec67c7ded4387810f0e91592f83224f43cc68688fe2efcdeea28f02800a,27,0x1ab36fd3ea73db6c1c4d7c1236e99f942f225550,0x4300000000000000000000000000000000000004,304466,870266525314993986598,320000000000000000 | ||
blast,thruster,UNI-V2-30bps,2024-05-27,0x26582d34111d36c28dc77ee888461560f6daaac3a5106632a337565fb6e0e46d,138,0x2aa236e546614f18a51fcc8e4238be194d720fa4,0x4300000000000000000000000000000000000004,3985280,37417538581914724457373,2450000000000000 | ||
blast,thruster,UNI-V2-30bps,2024-05-27,0x92412259d6e7267aa53b29a82cd546dc3ef14c5cc618990cd115f94b7178d8f0,195,0x2aa236e546614f18a51fcc8e4238be194d720fa4,0x4300000000000000000000000000000000000004,3985014,6274627375250141469648,100000000000000 | ||
blast,thruster,UNI-V3,2024-05-14,0x1ebfe078700f79b536091785e31667394b4f63cc47921b7255b91e314421f5eb,45,0x4300000000000000000000000000000000000003,0x4300000000000000000000000000000000000004,3441478,32226590148836069138,11090000000000000 | ||
blast,thruster,UNI-V3,2024-05-09,0x7c847b6ff32f6ecc65477f6850c59846352221308ee5a13a43e289cacb5d5637,50,0x5ffd9ebd27f2fcab044c0f0a26a45cb62fa29c06,0x4300000000000000000000000000000000000003,3210022,13539251642158192509,2382510511664620118 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters