Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-snx committed Dec 12, 2024
1 parent b6ee11e commit 060282f
Show file tree
Hide file tree
Showing 68 changed files with 140 additions and 121 deletions.
3 changes: 3 additions & 0 deletions transformers/synthetix/.sqlfluff
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ allow_scalar = False
[sqlfluff:rules:capitalisation.identifiers]
extended_capitalisation_policy = lower

[sqlfluff:rules:capitalisation.types]
extended_capitalisation_policy = pascal

[sqlfluff:rules:capitalisation.functions]
capitalisation_policy = lower

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ select
from
combined_blocks
group by
block_number
block_number
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with core_account_created as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with delegation_updated as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -22,4 +22,4 @@ select
cast(amount as UInt256) as amount,
cast(leverage as UInt256) as leverage
from
delegation_updated
delegation_updated
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with core_deposited as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -19,4 +19,4 @@ select
cast(account_id as UInt128) as account_id,
collateral_type,
cast(token_amount as UInt256) as token_amount
from core_deposited
from core_deposited
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with core_liquidation as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -21,4 +21,4 @@ select
cast(pool_id as UInt128) as pool_id,
collateral_type,
cast(liquidate_as_account_id as UInt128) as liquidate_as_account_id
from core_liquidation
from core_liquidation
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with core_market_registered as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ with events as (
collateral_type,
cast(market_id as UInt128) as market_id,
cast(net_issuance as Int128) as net_issuance,
cast(deposited_collateral_value as UInt256) as deposited_collateral_value,
cast(
deposited_collateral_value as UInt256
) as deposited_collateral_value,
cast(credit_capacity as Int128) as credit_capacity,
cast(token_amount as UInt256) as token_amount
from
Expand All @@ -35,7 +37,9 @@ with events as (
collateral_type,
cast(market_id as UInt128) as market_id,
cast(net_issuance as Int128) as net_issuance,
cast(deposited_collateral_value as UInt256) as deposited_collateral_value,
cast(
deposited_collateral_value as UInt256
) as deposited_collateral_value,
cast(credit_capacity as Int128) as credit_capacity,
cast(token_amount as UInt256) as token_amount
from
Expand All @@ -60,7 +64,9 @@ with events as (
'USD' as collateral_type,
cast(market_id as UInt128) as market_id,
cast(net_issuance as Int128) as net_issuance,
cast(deposited_collateral_value as UInt256) as deposited_collateral_value,
cast(
deposited_collateral_value as UInt256
) as deposited_collateral_value,
cast(credit_capacity as Int128) as credit_capacity,
cast(amount as UInt256) as token_amount
from
Expand All @@ -85,7 +91,9 @@ with events as (
'USD' as collateral_type,
cast(market_id as UInt128) as market_id,
cast(net_issuance as Int128) as net_issuance,
cast(deposited_collateral_value as UInt256) as deposited_collateral_value,
cast(
deposited_collateral_value as UInt256
) as deposited_collateral_value,
cast(credit_capacity as Int128) as credit_capacity,
cast(amount as UInt256) as token_amount
from
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with core_pool_created as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with core_rewards_claimed as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -20,4 +20,4 @@ select
collateral_type,
distributor,
cast(amount as UInt256) as amount
from core_rewards_claimed
from core_rewards_claimed
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with core_rewards_distributed as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -21,4 +21,4 @@ select
cast(amount as UInt256) as amount,
cast(start as UInt256) as start,
cast(duration as UInt256) as duration
from core_rewards_distributed
from core_rewards_distributed
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with core_usd_burned as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with core_usd_minted as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -20,4 +20,4 @@ select
cast(pool_id as UInt128) as pool_id,
collateral_type,
cast(amount as UInt256) as amount
from core_usd_minted
from core_usd_minted
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with core_vault_liquidation as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -20,4 +20,4 @@ select
cast(pool_id as UInt128) as pool_id,
cast(collateral_type as text) as collateral_type,
cast(liquidate_as_account_id as UInt128) as liquidate_as_account_id
from core_vault_liquidation
from core_vault_liquidation
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with core_withdrawn as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with perps_account_created as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with perps_account_liquidation_attempt as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -18,4 +18,4 @@ select
cast(account_id as UInt128) as account_id,
cast(reward as UInt256) as reward,
full_liquidation
from perps_account_liquidation_attempt
from perps_account_liquidation_attempt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with perps_collateral_modified as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -19,4 +19,4 @@ select
cast(collateral_id as UInt128) as collateral_id,
cast(amount_delta as Int256) as amount_delta,
sender
from perps_collateral_modified
from perps_collateral_modified
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with perps_interest_charged as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -17,4 +17,4 @@ select
event_name,
cast(account_id as UInt128) as account_id,
cast(interest as UInt256) as interest
from perps_interest_charged
from perps_interest_charged
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with perps_interest_rate_updated as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -17,4 +17,4 @@ select
event_name,
cast(super_market_id as UInt128) as super_market_id,
cast(interest_rate as UInt128) as interest_rate
from perps_interest_rate_updated
from perps_interest_rate_updated
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with perps_market_created as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -18,4 +18,4 @@ select
market_name,
market_symbol,
cast(perps_market_id as UInt128) as perps_market_id
from perps_market_created
from perps_market_created
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with perps_market_updated as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -24,4 +24,4 @@ select
cast(current_funding_velocity as Int256) as current_funding_velocity,
cast(interest_rate as UInt128) as interest_rate
from
perps_market_updated
perps_market_updated
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with perps_order_committed as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand Down Expand Up @@ -27,4 +27,4 @@ select
sender,
{{ convert_hex('tracking_code') }} as tracking_code
from
perps_order_committed
perps_order_committed
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with perps_order_settled as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand Down Expand Up @@ -28,4 +28,4 @@ select
cast(settlement_reward as UInt256) as settlement_reward,
{{ convert_hex('tracking_code') }} as tracking_code,
settler
from perps_order_settled
from perps_order_settled
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with perps_position_liquidated as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -19,4 +19,4 @@ select
cast(market_id as UInt128) as market_id,
cast(amount_liquidated as UInt256) as amount_liquidated,
cast(current_position_size as Int128) as current_position_size
from perps_position_liquidated
from perps_position_liquidated
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with perps_previous_order_expired as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -21,4 +21,4 @@ select
cast(acceptable_price as UInt256) as acceptable_price,
cast(commitment_time as UInt256) as commitment_time,
{{ convert_hex('tracking_code') }} as tracking_code
from perps_previous_order_expired
from perps_previous_order_expired
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with spot_order_cancelled as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -19,4 +19,4 @@ select
async_order_claim,
market_id,
async_order_id
from spot_order_cancelled
from spot_order_cancelled
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with spot_order_committed as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -21,4 +21,4 @@ select
cast(async_order_id as UInt128) as async_order_id,
sender,
referrer
from spot_order_committed
from spot_order_committed
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with spot_order_settled as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand All @@ -23,4 +23,4 @@ select
settler,
cast(price as UInt256) as price,
cast(order_type as UInt8) as order_type
from spot_order_settled
from spot_order_settled
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with spot_synth_bought as (
{{ get_event_data(
{{ get_event_data( -- noqa
'arbitrum',
'mainnet',
'synthetix',
Expand Down
Loading

0 comments on commit 060282f

Please sign in to comment.