-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add gridex on polygon to dex.trades (#6143)
* Add gridex on polygon to dex.trades * update seed * Add gridex_polygon_base_trades_seed schema --------- Co-authored-by: Huang Geyang <[email protected]> Co-authored-by: jeff-dude <[email protected]>
- Loading branch information
1 parent
6f401a1
commit ae2d873
Showing
6 changed files
with
68 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
25 changes: 25 additions & 0 deletions
25
dex/models/trades/polygon/platforms/gridex_polygon_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,25 @@ | ||
{{ | ||
config( | ||
schema = 'gridex_polygon', | ||
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')] | ||
) | ||
}} | ||
|
||
{{ | ||
uniswap_compatible_v3_trades( | ||
blockchain = 'polygon', | ||
project = 'gridex', | ||
version = '1', | ||
Pair_evt_Swap = source('gridex_polygon', 'GridPair_evt_Swap'), | ||
Factory_evt_PoolCreated = source('gridex_polygon', 'GridFactory_evt_GridCreated'), | ||
taker_column_name = 'sender', | ||
maker_column_name = 'recipient', | ||
optional_columns = null, | ||
pair_column_name = 'grid' | ||
) | ||
}} |
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,2 @@ | ||
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 | ||
polygon,gridex,1,2023-09-05,0x66c372a49c17f07337b331fe5e76ceda9b968e6cf22170c88281632637e53276,120,0x2791bca1f2de4661ed88a30c99a7a9449aa84174,0x924442a46eac25646b520da8d78218ae8ff437c2,47167864,72079513,30000000000000000000000 |
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