Skip to content

Commit

Permalink
Add missing spells for Solidly V3
Browse files Browse the repository at this point in the history
Now it should be available in dex.trades
  • Loading branch information
ibilbobaggins committed Jun 10, 2024
1 parent 4603bf5 commit b59c08c
Show file tree
Hide file tree
Showing 16 changed files with 220 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_arbitrum_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')
)
}}
18 changes: 18 additions & 0 deletions models/_sector/dex/trades/base/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -919,3 +919,21 @@ models:
filter:
version:
- 1

- name: solidly_v3_base_base_trades
meta:
blockchain: base
sector: dex
project: solidly
contributors: SolidlyLabs
config:
tags: [ 'base', 'dex', 'trades', 'solidly' ]
description: "solidly v3 base 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_base_base_trades_seed')

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_ethereum_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_fantom_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')
)
}}
62 changes: 61 additions & 1 deletion seeds/_sector/dex/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2641,6 +2641,67 @@ 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 +2716,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
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 b59c08c

Please sign in to comment.