-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
base: main
Are you sure you want to change the base?
Dip Exchange on Base #7582
Conversation
@@ -0,0 +1,46 @@ | |||
{{ config( | |||
schema = 'dip_exchange_perpetual_trades', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
schema = 'dip_exchange_perpetual_trades', | |
schema = 'dip_exchange_base', |
@@ -0,0 +1,119 @@ | |||
{{ config( | |||
alias = 'perpetual_trades', | |||
schema = 'pool_base', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
schema = 'pool_base', | |
schema = 'dip_exchange_v1_base', |
indexToken, | ||
side, | ||
CAST(NULL AS DOUBLE) AS pnl | ||
FROM delta_prod.pool_base.Pool_evt_IncreasePosition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FROM delta_prod.pool_base.Pool_evt_LiquidatePosition | |
FROM {{ source('pool_base', 'Pool_evt_LiquidatePosition') }} |
|
||
SELECT | ||
'base' AS blockchain, | ||
'dip-exchange' AS project, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'dip-exchange' AS project, | |
'dip_exchange' AS project, |
'base' AS blockchain, | ||
'dip-exchange' AS project, | ||
'1' AS version, | ||
'dip-exchange' AS frontend, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'dip-exchange' AS frontend, | |
'dip_exchange' AS frontend, |
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: