Skip to content

Commit

Permalink
Add Solidly V3 to dex.trades (#6115)
Browse files Browse the repository at this point in the history
* Add Solidly V3 to dex.trades

Only Optimism was available.
Added missing chains:
1. Arbitrum
2. Base
3. Ethereum
4. Fantom

* Remove extra blank line

* Update seeds/_sector/dex/_schema.yml

---------

Co-authored-by: Huang Geyang <[email protected]>
  • Loading branch information
ibilbobaggins and Hosuke authored Jun 11, 2024
1 parent cd72e2f commit 569b7ee
Show file tree
Hide file tree
Showing 20 changed files with 218 additions and 6 deletions.
18 changes: 18 additions & 0 deletions models/_sector/dex/trades/arbitrum/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -680,3 +680,21 @@ models:
- evt_index
- check_dex_base_trades_seed:
seed_file: ref('wombat_exchange_arbitrum_base_trades_seed')

- name: solidly_v3_arbitrum_base_trades
meta:
blockchain: arbitrum
sector: dex
project: solidly
contributors: SolidlyLabs
config:
tags: [ 'arbitrum', 'dex', 'trades', 'solidly' ]
description: "solidly v3 arbitrum base trades"
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- tx_hash
- evt_index
- check_dex_base_trades_seed:
seed_file: ref('solidly_v3_arbitrum_base_trades_seed')

Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
, ref('uniswap_v2_arbitrum_base_trades')
, ref('auragi_arbitrum_base_trades')
, ref('wombat_exchange_arbitrum_base_trades')
, ref('solidly_v3_arbitrum_base_trades')
] %}

WITH base_union AS (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{
config(
schema = 'solidly_v3_arbitrum',
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 = 'arbitrum',
project = 'solidly',
version = '3',
Pair_evt_Swap = source('solidly_v3_arbitrum', 'SolidlyV3Pool_evt_Swap'),
Factory_evt_PoolCreated = source('solidly_v3_arbitrum', 'SolidlyV3Factory_evt_PoolCreated')
)
}}
1 change: 1 addition & 0 deletions models/_sector/dex/trades/base/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -919,3 +919,4 @@ models:
filter:
version:
- 1

3 changes: 2 additions & 1 deletion models/_sector/dex/trades/base/dex_base_base_trades.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
, ref('alienbase_base_base_trades')
, ref('swapbased_base_base_trades')
, ref('clipper_base_base_trades')
, ref('solidly_v3_base_base_trades')
] %}

WITH base_union AS (
Expand Down Expand Up @@ -83,4 +84,4 @@ WITH base_union AS (
, blockchain = 'base'
, columns = ['from', 'to', 'index']
)
}}
}}
18 changes: 18 additions & 0 deletions models/_sector/dex/trades/ethereum/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -543,3 +543,21 @@ models:
- Factory V2
- Factory V2 updated
- Regular

- name: solidly_v3_ethereum_base_trades
meta:
blockchain: ethereum
sector: dex
project: solidly
contributors: SolidlyLabs
config:
tags: [ 'ethereum', 'dex', 'trades', 'solidly' ]
description: "solidly v3 ethereum base trades"
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- tx_hash
- evt_index
- check_dex_base_trades_seed:
seed_file: ref('solidly_v3_ethereum_base_trades_seed')

Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
, ref('mstable_ethereum_base_trades')
, ref('xchange_ethereum_base_trades')
, ref('curvefi_ethereum_base_trades')
, ref('solidly_v3_ethereum_base_trades')
] %}

WITH base_union AS (
Expand Down Expand Up @@ -72,4 +73,4 @@ WITH base_union AS (
, blockchain = 'ethereum'
, columns = ['from', 'to', 'index']
)
}}
}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{
config(
schema = 'solidly_v3_ethereum',
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 = 'ethereum',
project = 'solidly',
version = '3',
Pair_evt_Swap = source('solidly_ethereum', 'SolidlyV3Pool_evt_Swap'),
Factory_evt_PoolCreated = source('solidly_v3_ethereum', 'SolidlyV3Factory_evt_PoolCreated')
)
}}
18 changes: 18 additions & 0 deletions models/_sector/dex/trades/fantom/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,21 @@ models:
- evt_index
- check_dex_base_trades_seed:
seed_file: ref('curvefi_fantom_base_trades_seed')

- name: solidly_v3_fantom_base_trades
meta:
blockchain: fantom
sector: dex
project: solidly
contributors: SolidlyLabs
config:
tags: [ 'fantom', 'dex', 'trades', 'solidly' ]
description: "solidly v3 fantom base trades"
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- tx_hash
- evt_index
- check_dex_base_trades_seed:
seed_file: ref('solidly_v3_fantom_base_trades_seed')

3 changes: 2 additions & 1 deletion models/_sector/dex/trades/fantom/dex_fantom_base_trades.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
, ref('openocean_fantom_base_trades')
, ref('beethoven_x_fantom_base_trades')
, ref('curvefi_fantom_base_trades')
, ref('solidly_v3_fantom_base_trades')
] %}

WITH base_union AS (
Expand Down Expand Up @@ -54,4 +55,4 @@ WITH base_union AS (
, blockchain = 'fantom'
, columns = ['from', 'to', 'index']
)
}}
}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{
config(
schema = 'solidly_v3_fantom',
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 = 'fantom',
project = 'solidly',
version = '3',
Pair_evt_Swap = source('solidly_v3_fantom', 'SolidlyV3Pool_evt_Swap'),
Factory_evt_PoolCreated = source('solidly_v3_fantom', 'SolidlyV3Factory_evt_PoolCreated')
)
}}
61 changes: 60 additions & 1 deletion seeds/_sector/dex/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2641,6 +2641,66 @@ seeds:
token_sold_amount_raw: uint256
block_date: timestamp

- name: solidly_v3_arbitrum_base_trades_seed
config:
column_types:
blockchain: varchar
project: varchar
version: varchar
tx_hash: varbinary
evt_index: uint256
block_number: uint256
token_bought_address: varbinary
token_sold_address: varbinary
token_bought_amount_raw: uint256
token_sold_amount_raw: uint256
block_date: timestamp

- name: solidly_v3_base_base_trades_seed
config:
column_types:
blockchain: varchar
project: varchar
version: varchar
tx_hash: varbinary
evt_index: uint256
block_number: uint256
token_bought_address: varbinary
token_sold_address: varbinary
token_bought_amount_raw: uint256
token_sold_amount_raw: uint256
block_date: timestamp

- name: solidly_v3_ethereum_base_trades_seed
config:
column_types:
blockchain: varchar
project: varchar
version: varchar
tx_hash: varbinary
evt_index: uint256
block_number: uint256
token_bought_address: varbinary
token_sold_address: varbinary
token_bought_amount_raw: uint256
token_sold_amount_raw: uint256
block_date: timestamp

- name: solidly_v3_fantom_base_trades_seed
config:
column_types:
blockchain: varchar
project: varchar
version: varchar
tx_hash: varbinary
evt_index: uint256
block_number: uint256
token_bought_address: varbinary
token_sold_address: varbinary
token_bought_amount_raw: uint256
token_sold_amount_raw: uint256
block_date: timestamp

- name: solidly_v3_optimism_base_trades_seed
config:
column_types:
Expand All @@ -2655,7 +2715,6 @@ seeds:
token_bought_amount_raw: uint256
token_sold_amount_raw: uint256
block_date: timestamp


- name: throne_exchange_v2_base_base_trades_seed
config:
Expand Down
4 changes: 4 additions & 0 deletions seeds/_sector/dex/solidly_v3_arbitrum_base_trades_seed.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
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
arbitrum,solidly,3,2024-02-03 00:00,0x52c606cf45d6ed8fc2a4da3f60c03689f600304583fdd1785d72ec1fce91867a,0,0x82af49447d8a07e3bd95bd0d56f35241523fbab1,0x777cf5ba9c291a1a8f57ff14836f6f9dc5c0f9dd,176909487,36416857171863695,59387847732386017794
arbitrum,solidly,3,2024-02-20 00:00,0xa13d2c0ac281d50be8df4d2e3de66b29d05cade284713e8c187e15859dad8773,3,0x82af49447d8a07e3bd95bd0d56f35241523fbab1,0x777cf5ba9c291a1a8f57ff14836f6f9dc5c0f9dd,182782312,22492992787274686,81464201443220691722
arbitrum,solidly,3,2024-02-20 00:00,0x106440bdc160cbcc6399b52ba3eea82d189e241efe972872c2f82ed5a64789f8,1,0x82af49447d8a07e3bd95bd0d56f35241523fbab1,0x777cf5ba9c291a1a8f57ff14836f6f9dc5c0f9dd,182822978,6534900983689228,22422394504796743842
4 changes: 4 additions & 0 deletions seeds/_sector/dex/solidly_v3_base_base_trades_seed.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
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
base,solidly,3,2024-06-10 00:00,0x706e92a6f8a93d017b4fdf60fc5a584bfea18a8638ec451c020d3df7573de64c,778,0x4200000000000000000000000000000000000006,0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca,15609599,22040269642169822,80932998
base,solidly,3,2024-06-10 00:00,0x2c3e8953eef8bb916a0790f09c18b6a138224f23bc85a530261b71e759deab7e,97,0x833589fcd6edb6e08f4c7c32d4f71b54bda02913,0x4200000000000000000000000000000000000006,15607737,24639725,6716121101724876
base,solidly,3,2024-06-10 00:00,0x2c3e8953eef8bb916a0790f09c18b6a138224f23bc85a530261b71e759deab7e,73,0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca,0x4200000000000000000000000000000000000006,15607737,43407460,11830085711227632
4 changes: 4 additions & 0 deletions seeds/_sector/dex/solidly_v3_ethereum_base_trades_seed.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
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
ethereum,solidly,3,2024-06-10 00:00,0x20fa27abd1fe594fc8a5ce9bcd5570eb60aba66096edc6c91ef5c0a99a73fa6c,13,0xdac17f958d2ee523a2206206994597c13d831ec7,0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,20060409,3000185944,3000000000
ethereum,solidly,3,2024-06-10 00:00,0xcc56cb586f080bf4373a8bcc155eb196207371b1883afa79bfdf4c677ebfe322,184,0xdac17f958d2ee523a2206206994597c13d831ec7,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,20060404,416368244,113284585282640407
ethereum,solidly,3,2024-06-10 00:00,0x0515f6832b29bc2a4bbc8783cd73d9de21b5c18fac995f4fd74227308c0e83a8,387,0x514910771af9ca656af840dff83e8264ecf986ca,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,20060407,8734073046064652081,37947785482442443
4 changes: 4 additions & 0 deletions seeds/_sector/dex/solidly_v3_fantom_base_trades_seed.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
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
fantom,solidly,3,2024-06-07 00:00,0x462dc78dbf5a2b4ce5b6995d6a38d56531d3301b25a24b76de8f76f3c450fbe2,0,0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83,0x777cf5ba9c291a1a8f57ff14836f6f9dc5c0f9dd,82468153,11044657622844009042,21850742643724726685
fantom,solidly,3,2024-06-08 00:00,0x85c64e4ae23bcb6480f4fac1981bbae30a7181a5f3509b5cd87314582f0ca1d9,0,0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83,0x777cf5ba9c291a1a8f57ff14836f6f9dc5c0f9dd,82468593,43457629613780119432,86051119761832979402
fantom,solidly,3,2024-06-08 00:00,0xfeaa63121d70b7ac3a4dd50b7b11eaee7d40eb618f3a6b6e58ca6a7a0d9d0bb5,5,0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83,0x777cf5ba9c291a1a8f57ff14836f6f9dc5c0f9dd,82468732,47097938059274277077,93393856598932340439
7 changes: 6 additions & 1 deletion sources/_sector/dex/trades/arbitrum/_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,9 @@ sources:
- name: PairFactory_evt_PairCreated
- name: wombatexchange_arbitrum
tables:
- name: CrossChainPool_evt_SwapV2
- name: CrossChainPool_evt_SwapV2
- name: solidly_v3_arbitrum
tables:
- name: SolidlyV3Factory_evt_PoolCreated
- name: SolidlyV3Pool_evt_Swap

5 changes: 5 additions & 0 deletions sources/_sector/dex/trades/ethereum/_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,8 @@ sources:
tables:
- name: XchangePair_evt_Swap
- name: XchangeFactory_evt_PairCreated
- name: solidly_v3_ethereum
tables:
- name: SolidlyV3Factory_evt_PoolCreated
- name: SolidlyV3Pool_evt_Swap

5 changes: 5 additions & 0 deletions sources/_sector/dex/trades/fantom/_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ sources:
tables:
- name: StableSwap_evt_TokenExchange
- name: StableSwap_evt_TokenExchangeUnderlying
- name: solidly_v3_fantom
tables:
- name: SolidlyV3Factory_evt_PoolCreated
- name: SolidlyV3Pool_evt_Swap

2 changes: 1 addition & 1 deletion sources/_sector/dex/trades/optimism/_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ sources:
- name: fraxswap_optimism
tables:
- name: FraxswapPair_evt_Swap
- name: FraxswapFactory_evt_PairCreated
- name: FraxswapFactory_evt_PairCreated

0 comments on commit 569b7ee

Please sign in to comment.