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

Dip Exchange on Base #7582

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

PatelPrinci
Copy link
Contributor

Thank you for contributing to Spellbook 🪄

Please open the PR in draft and mark as ready when you want to request a review.

Description:

[...]


quick links for more information:

@github-actions github-actions bot marked this pull request as draft January 28, 2025 12:59
@github-actions github-actions bot added WIP work in progress dbt: hourly covers the hourly dbt subproject labels Jan 28, 2025
@PatelPrinci PatelPrinci marked this pull request as ready for review January 28, 2025 13:19
@github-actions github-actions bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Jan 28, 2025
@@ -0,0 +1,46 @@
{{ config(
schema = 'dip_exchange_perpetual_trades',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
schema = 'dip_exchange_perpetual_trades',
schema = 'dip_exchange_base',

@@ -0,0 +1,119 @@
{{ config(
alias = 'perpetual_trades',
schema = 'pool_base',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
schema = 'pool_base',
schema = 'dip_exchange_v1_base',

indexToken,
side,
CAST(NULL AS DOUBLE) AS pnl
FROM delta_prod.pool_base.Pool_evt_IncreasePosition
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FROM delta_prod.pool_base.Pool_evt_IncreasePosition
FROM {{ source('pool_base', 'Pool_evt_IncreasePosition') }}

indexToken,
side,
TRY_CAST(JSON_EXTRACT_SCALAR(pnl, '$.abs') AS DOUBLE)/1e30 AS pnl
FROM delta_prod.pool_base.Pool_evt_DecreasePosition
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FROM delta_prod.pool_base.Pool_evt_DecreasePosition
FROM {{ source('pool_base', 'Pool_evt_DecreasePosition') }}

indexToken,
side,
TRY_CAST(JSON_EXTRACT_SCALAR(pnl, '$.abs') AS DOUBLE)/1e30 AS pnl
FROM delta_prod.pool_base.Pool_evt_LiquidatePosition
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FROM delta_prod.pool_base.Pool_evt_LiquidatePosition
FROM {{ source('pool_base', 'Pool_evt_LiquidatePosition') }}


SELECT
'base' AS blockchain,
'dip-exchange' AS project,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'dip-exchange' AS project,
'dip_exchange' AS project,

'base' AS blockchain,
'dip-exchange' AS project,
'1' AS version,
'dip-exchange' AS frontend,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'dip-exchange' AS frontend,
'dip_exchange' AS frontend,

@jeff-dude jeff-dude added WIP work in progress and removed ready-for-review this PR development is complete, please review labels Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dbt: hourly covers the hourly dbt subproject WIP work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants