diff --git a/transformers/synthetix/models/marts/arbitrum/mainnet/core/schema.yml b/transformers/synthetix/models/marts/arbitrum/mainnet/core/schema.yml index 3d8b7b2b..7aea07f1 100644 --- a/transformers/synthetix/models/marts/arbitrum/mainnet/core/schema.yml +++ b/transformers/synthetix/models/marts/arbitrum/mainnet/core/schema.yml @@ -3,17 +3,41 @@ models: - name: fct_pool_rewards_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: token_symbol + description: "Token symbol" data_type: text + tests: + - not_null - name: amount + description: "Reward amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: ts_start data_type: timestamp with time zone - name: duration @@ -21,53 +45,145 @@ models: - name: fct_core_account_delegation_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: account_id - data_type: text + description: "ID of the account" + data_type: numeric + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: amount_delegated + description: "Amount of delegated collateral" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_core_apr_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: collateral_value + description: "Collateral value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: debt + description: "Debt value (USD)" data_type: numeric + tests: + - not_null - name: hourly_issuance + description: "Hourly issuance" data_type: numeric + tests: + - not_null - name: hourly_pnl + description: "Hourly PnL" data_type: numeric + tests: + - not_null - name: cumulative_pnl + description: "Cumulative PnL" data_type: numeric + tests: + - not_null - name: cumulative_issuance + description: "Cumulative Issuance" data_type: numeric + tests: + - not_null - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: hourly_pnl_pct - data_type: numeric + description: "Hourly PnL (%)" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: -1 + max_value: 1 + inclusive: true - name: hourly_rewards_pct - data_type: numeric + description: "Hourly Rewards (%)" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + max_value: 1 + inclusive: true - name: apr_24h + description: "APR (24h)" data_type: numeric + tests: + - not_null - name: apy_24h + description: "APY (24h)" data_type: numeric + tests: + - not_null - name: apr_7d + description: "APR (7d)" data_type: numeric + tests: + - not_null - name: apy_7d + description: "APY (7d)" data_type: numeric + tests: + - not_null - name: apr_28d + description: "APR (28d)" data_type: numeric + tests: + - not_null - name: apy_28d + description: "APY (28d)" data_type: numeric + tests: + - not_null - name: apr_24h_pnl data_type: numeric - name: apy_24h_pnl @@ -95,140 +211,376 @@ models: - name: fct_core_market_updated_arbitrum_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketCollateralWithdrawn", "MarketCollateralDeposited", "MarketUsdWithdrawn", "MarketUsdDeposited"] - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: credit_capacity + description: "Credit capacity" data_type: numeric + tests: + - not_null - name: net_issuance + description: "Net issuance" data_type: numeric + tests: + - not_null - name: token_amount + description: "Token amount" data_type: numeric + tests: + - not_null - name: fct_core_pool_collateral_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: amount_deposited + description: "Amount deposited" data_type: numeric + tests: + - not_null - name: fct_core_pool_delegation_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: amount_delegated data_type: numeric - name: fct_core_pools_arbitrum_mainnet columns: - name: id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: created_ts + description: "Pool creation timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: owner + description: "Address of the pool owner" data_type: text + tests: + - not_null - name: fct_pool_debt_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number - data_type: bigint - - name: pool_id + description: "Block number" data_type: integer + tests: + - not_null + - name: pool_id + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: debt + description: "Debt value (USD)" data_type: numeric + tests: + - not_null - name: fct_pool_issuance_hourly_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: hourly_issuance + description: "Hourly issuance" data_type: numeric + tests: + - not_null - name: fct_pool_issuance_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null - name: amount + description: "Amount issued" data_type: numeric + tests: + - not_null - name: fct_pool_pnl_hourly_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: collateral_value + description: "Collateral value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: debt + description: "Debt value (USD)" data_type: numeric + tests: + - not_null - name: hourly_issuance + description: "Hourly issuance" data_type: numeric + tests: + - not_null - name: hourly_pnl + description: "Hourly PnL" data_type: numeric + tests: + - not_null - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: hourly_pnl_pct - data_type: numeric + description: "Hourly PnL (%)" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: -1 + max_value: 1 + inclusive: true - name: hourly_rewards_pct - data_type: numeric + description: "Hourly Rewards (%)" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + max_value: 1 + inclusive: true - name: hourly_total_pct + description: "Hourly Total (%)" data_type: numeric + tests: + - not_null - name: fct_pool_rewards_hourly_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_pool_rewards_token_hourly_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: token_symbol + description: "Token symbol" data_type: text + tests: + - not_null - name: price + description: "Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: hourly_amount + description: "Hourly rewards amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: amount_distributed + description: "Distributed rewards amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/marts/arbitrum/mainnet/prices/schema.yml b/transformers/synthetix/models/marts/arbitrum/mainnet/prices/schema.yml index 0f1fff2b..89a22dbc 100644 --- a/transformers/synthetix/models/marts/arbitrum/mainnet/prices/schema.yml +++ b/transformers/synthetix/models/marts/arbitrum/mainnet/prices/schema.yml @@ -2,18 +2,45 @@ models: - name: fct_prices_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: market_address + description: "Market address" data_type: text + tests: + - not_null - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: price + description: "Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_prices_hourly_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: price + description: "Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/marts/arbitrum/mainnet/spot/schema.yml b/transformers/synthetix/models/marts/arbitrum/mainnet/spot/schema.yml index 43ad9731..5d5e6d8c 100644 --- a/transformers/synthetix/models/marts/arbitrum/mainnet/spot/schema.yml +++ b/transformers/synthetix/models/marts/arbitrum/mainnet/spot/schema.yml @@ -2,52 +2,131 @@ models: - name: fct_synth_supply_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: synth_market_id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: supply + description: "Supply" data_type: numeric + tests: + - not_null - name: fct_spot_atomics_arbitrum_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: tx_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: price + description: "Price" data_type: numeric + tests: + - not_null - name: amount + description: "Amount" data_type: numeric + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: fct_spot_markets_arbitrum_mainnet columns: - name: id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: created_ts data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: token_address + description: "Token address" data_type: text + tests: + - not_null - name: fct_spot_wrapper_arbitrum_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: tx_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: amount_wrapped + description: "Amount wrapped" data_type: numeric + tests: + - not_null diff --git a/transformers/synthetix/models/marts/arbitrum/sepolia/core/schema.yml b/transformers/synthetix/models/marts/arbitrum/sepolia/core/schema.yml index 6f6c73e2..65c1a2fd 100644 --- a/transformers/synthetix/models/marts/arbitrum/sepolia/core/schema.yml +++ b/transformers/synthetix/models/marts/arbitrum/sepolia/core/schema.yml @@ -3,17 +3,41 @@ models: - name: fct_pool_rewards_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: token_symbol + description: "Token symbol" data_type: text + tests: + - not_null - name: amount + description: "Reward amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: ts_start data_type: timestamp with time zone - name: duration @@ -21,53 +45,145 @@ models: - name: fct_core_account_delegation_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: account_id - data_type: text + description: "ID of the account" + data_type: numeric + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: amount_delegated + description: "Amount of delegated collateral" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_core_apr_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: collateral_value + description: "Collateral value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: debt + description: "Debt value (USD)" data_type: numeric + tests: + - not_null - name: hourly_issuance + description: "Hourly issuance" data_type: numeric + tests: + - not_null - name: hourly_pnl + description: "Hourly PnL" data_type: numeric + tests: + - not_null - name: cumulative_pnl + description: "Cumulative PnL" data_type: numeric + tests: + - not_null - name: cumulative_issuance + description: "Cumulative Issuance" data_type: numeric + tests: + - not_null - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: hourly_pnl_pct - data_type: numeric + description: "Hourly PnL (%)" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: -1 + max_value: 1 + inclusive: true - name: hourly_rewards_pct - data_type: numeric + description: "Hourly Rewards (%)" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + max_value: 1 + inclusive: true - name: apr_24h + description: "APR (24h)" data_type: numeric + tests: + - not_null - name: apy_24h + description: "APY (24h)" data_type: numeric + tests: + - not_null - name: apr_7d + description: "APR (7d)" data_type: numeric + tests: + - not_null - name: apy_7d + description: "APY (7d)" data_type: numeric + tests: + - not_null - name: apr_28d + description: "APR (28d)" data_type: numeric + tests: + - not_null - name: apy_28d + description: "APY (28d)" data_type: numeric + tests: + - not_null - name: apr_24h_pnl data_type: numeric - name: apy_24h_pnl @@ -95,140 +211,376 @@ models: - name: fct_core_market_updated_arbitrum_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketCollateralWithdrawn", "MarketCollateralDeposited", "MarketUsdWithdrawn", "MarketUsdDeposited"] - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: credit_capacity + description: "Credit capacity" data_type: numeric + tests: + - not_null - name: net_issuance + description: "Net issuance" data_type: numeric + tests: + - not_null - name: token_amount + description: "Token amount" data_type: numeric + tests: + - not_null - name: fct_core_pool_collateral_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: amount_deposited + description: "Amount deposited" data_type: numeric + tests: + - not_null - name: fct_core_pool_delegation_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: amount_delegated data_type: numeric - name: fct_core_pools_arbitrum_sepolia columns: - name: id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: created_ts + description: "Pool creation timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: owner + description: "Address of the pool owner" data_type: text + tests: + - not_null - name: fct_pool_debt_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number - data_type: bigint - - name: pool_id + description: "Block number" data_type: integer + tests: + - not_null + - name: pool_id + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: debt + description: "Debt value (USD)" data_type: numeric + tests: + - not_null - name: fct_pool_issuance_hourly_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: hourly_issuance + description: "Hourly issuance" data_type: numeric + tests: + - not_null - name: fct_pool_issuance_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null - name: amount + description: "Amount issued" data_type: numeric + tests: + - not_null - name: fct_pool_pnl_hourly_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: collateral_value + description: "Collateral value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: debt + description: "Debt value (USD)" data_type: numeric + tests: + - not_null - name: hourly_issuance + description: "Hourly issuance" data_type: numeric + tests: + - not_null - name: hourly_pnl + description: "Hourly PnL" data_type: numeric + tests: + - not_null - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: hourly_pnl_pct - data_type: numeric + description: "Hourly PnL (%)" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: -1 + max_value: 1 + inclusive: true - name: hourly_rewards_pct - data_type: numeric + description: "Hourly Rewards (%)" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + max_value: 1 + inclusive: true - name: hourly_total_pct + description: "Hourly Total (%)" data_type: numeric + tests: + - not_null - name: fct_pool_rewards_hourly_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_pool_rewards_token_hourly_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: token_symbol + description: "Token symbol" data_type: text + tests: + - not_null - name: price + description: "Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: hourly_amount + description: "Hourly rewards amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: amount_distributed + description: "Distributed rewards amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/marts/arbitrum/sepolia/prices/schema.yml b/transformers/synthetix/models/marts/arbitrum/sepolia/prices/schema.yml index 881afc59..623ee1b3 100644 --- a/transformers/synthetix/models/marts/arbitrum/sepolia/prices/schema.yml +++ b/transformers/synthetix/models/marts/arbitrum/sepolia/prices/schema.yml @@ -2,18 +2,45 @@ models: - name: fct_prices_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: market_address + description: "Market address" data_type: text + tests: + - not_null - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: price + description: "Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_prices_hourly_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: price + description: "Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/marts/arbitrum/sepolia/spot/schema.yml b/transformers/synthetix/models/marts/arbitrum/sepolia/spot/schema.yml index 87d1d821..73fe1c98 100644 --- a/transformers/synthetix/models/marts/arbitrum/sepolia/spot/schema.yml +++ b/transformers/synthetix/models/marts/arbitrum/sepolia/spot/schema.yml @@ -2,52 +2,131 @@ models: - name: fct_synth_supply_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: synth_market_id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: supply + description: "Supply" data_type: numeric + tests: + - not_null - name: fct_spot_atomics_arbitrum_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: tx_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: price + description: "Price" data_type: numeric + tests: + - not_null - name: amount + description: "Amount" data_type: numeric + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: fct_spot_markets_arbitrum_sepolia columns: - name: id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: created_ts data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: token_address + description: "Token address" data_type: text + tests: + - not_null - name: fct_spot_wrapper_arbitrum_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: tx_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: amount_wrapped + description: "Amount wrapped" data_type: numeric + tests: + - not_null diff --git a/transformers/synthetix/models/marts/base/mainnet/buyback/schema.yml b/transformers/synthetix/models/marts/base/mainnet/buyback/schema.yml index c9cf9584..d92a4482 100644 --- a/transformers/synthetix/models/marts/base/mainnet/buyback/schema.yml +++ b/transformers/synthetix/models/marts/base/mainnet/buyback/schema.yml @@ -2,38 +2,120 @@ models: - name: fct_buyback_daily_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: snx_amount + description: "Amount in SNX" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: usd_amount + description: "Amount in USD" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: cumulative_snx_amount + description: "Cumulative amount in SNX" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: cumulative_usd_amount + description: "Cumulative amount in USD" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_buyback_hourly_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: snx_amount + description: "Amount in SNX" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: usd_amount + description: "Amount in USD" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: cumulative_snx_amount + description: "Cumulative amount in SNX" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: cumulative_usd_amount + description: "Cumulative amount in USD" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_buyback_base_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: buyer + description: "Address of buyer" data_type: text + tests: + - not_null - name: snx + description: "Amount in SNX" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: usd + description: "Amount in USD" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: snx_price + description: "SNX Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/marts/base/mainnet/core/schema.yml b/transformers/synthetix/models/marts/base/mainnet/core/schema.yml index 79e52021..4903ad49 100644 --- a/transformers/synthetix/models/marts/base/mainnet/core/schema.yml +++ b/transformers/synthetix/models/marts/base/mainnet/core/schema.yml @@ -3,33 +3,87 @@ models: - name: fct_core_vault_collateral_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number - data_type: bigint + description: "Block number" + data_type: integer + tests: + - not_null - name: contract_address + description: "Address of the contract" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: integer + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: character varying + tests: + - not_null - name: amount + description: "Collateral amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_value + description: "Vault collateral value" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_pool_rewards_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: token_symbol + description: "Token symbol" data_type: text + tests: + - not_null - name: amount + description: "Reward amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: ts_start data_type: timestamp with time zone - name: duration @@ -37,53 +91,141 @@ models: - name: fct_core_account_delegation_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: account_id - data_type: text + description: "ID of the account" + data_type: numeric + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: amount_delegated + description: "Amount of delegated collateral" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_core_apr_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: collateral_value + description: "Collateral value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: debt + description: "Debt value (USD)" data_type: numeric + tests: + - not_null - name: hourly_issuance + description: "Hourly issuance" data_type: numeric + tests: + - not_null - name: hourly_pnl + description: "Hourly PnL" data_type: numeric + tests: + - not_null - name: cumulative_pnl + description: "Cumulative PnL" data_type: numeric + tests: + - not_null - name: cumulative_issuance + description: "Cumulative Issuance" data_type: numeric + tests: + - not_null - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: hourly_pnl_pct + description: "Hourly PnL (%)" data_type: numeric + tests: + - not_null - name: hourly_rewards_pct - data_type: numeric + description: "Hourly Rewards (%)" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + max_value: 1 + inclusive: true - name: apr_24h + description: "APR (24h)" data_type: numeric + tests: + - not_null - name: apy_24h + description: "APY (24h)" data_type: numeric + tests: + - not_null - name: apr_7d + description: "APR (7d)" data_type: numeric + tests: + - not_null - name: apy_7d + description: "APY (7d)" data_type: numeric + tests: + - not_null - name: apr_28d + description: "APR (28d)" data_type: numeric + tests: + - not_null - name: apy_28d + description: "APY (28d)" data_type: numeric + tests: + - not_null - name: apr_24h_pnl data_type: numeric - name: apy_24h_pnl @@ -111,140 +253,372 @@ models: - name: fct_core_market_updated_base_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketCollateralWithdrawn", "MarketCollateralDeposited", "MarketUsdWithdrawn", "MarketUsdDeposited"] - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: credit_capacity + description: "Credit capacity" data_type: numeric + tests: + - not_null - name: net_issuance + description: "Net issuance" data_type: numeric + tests: + - not_null - name: token_amount + description: "Token amount" data_type: numeric + tests: + - not_null - name: fct_core_pool_collateral_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: amount_deposited + description: "Amount deposited" data_type: numeric + tests: + - not_null - name: fct_core_pool_delegation_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: amount_delegated data_type: numeric - name: fct_core_pools_base_mainnet columns: - name: id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: created_ts + description: "Pool creation timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: owner + description: "Address of the pool owner" data_type: text + tests: + - not_null - name: fct_pool_debt_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number - data_type: bigint - - name: pool_id + description: "Block number" data_type: integer + tests: + - not_null + - name: pool_id + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: debt + description: "Debt value (USD)" data_type: numeric + tests: + - not_null - name: fct_pool_issuance_hourly_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: hourly_issuance + description: "Hourly issuance" data_type: numeric + tests: + - not_null - name: fct_pool_issuance_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null - name: amount + description: "Amount issued" data_type: numeric + tests: + - not_null - name: fct_pool_pnl_hourly_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: collateral_value + description: "Collateral value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: debt + description: "Debt value (USD)" data_type: numeric + tests: + - not_null - name: hourly_issuance + description: "Hourly issuance" data_type: numeric + tests: + - not_null - name: hourly_pnl + description: "Hourly PnL" data_type: numeric + tests: + - not_null - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: hourly_pnl_pct + description: "Hourly PnL (%)" data_type: numeric + tests: + - not_null - name: hourly_rewards_pct - data_type: numeric + description: "Hourly Rewards (%)" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + max_value: 1 + inclusive: true - name: hourly_total_pct + description: "Hourly Total (%)" data_type: numeric + tests: + - not_null - name: fct_pool_rewards_hourly_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_pool_rewards_token_hourly_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: token_symbol + description: "Token symbol" data_type: text + tests: + - not_null - name: price + description: "Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: hourly_amount + description: "Hourly rewards amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: amount_distributed + description: "Distributed rewards amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/marts/base/mainnet/perp/schema.yml b/transformers/synthetix/models/marts/base/mainnet/perp/schema.yml index 575a20b6..e4863cd3 100644 --- a/transformers/synthetix/models/marts/base/mainnet/perp/schema.yml +++ b/transformers/synthetix/models/marts/base/mainnet/perp/schema.yml @@ -2,59 +2,154 @@ models: - name: fct_perp_interest_charged_base_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["InterestCharged"] - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: interest + description: "Interest amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_perp_collateral_modified_base_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["CollateralModified"] - name: synth_market_id + description: "Synth market ID" data_type: numeric - - name: sender + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true + - name: sender data_type: text + tests: + - not_null - name: amount_delta data_type: numeric - name: fct_perp_previous_order_expired_base_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["PreviousOrderExpired"] - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: commitment_time data_type: numeric - name: tracking_code @@ -66,77 +161,208 @@ models: - name: fct_perp_trades_base_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: text + tests: + - not_null - name: fill_price + description: "Fill price (ETH)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: pnl + description: "PnL (ETH)" data_type: numeric + tests: + - not_null - name: accrued_funding + description: "Accrued funding (ETH)" data_type: numeric + tests: + - not_null - name: trade_size + description: "Trade size (ETH)" data_type: numeric + tests: + - not_null - name: position_size + description: "Position size" data_type: numeric + tests: + - not_null - name: total_fees + description: "Total fees (ETH)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: referral_fees + description: "Referral fees (ETH)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collected_fees + description: "Collected fees (ETH)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: settlement_reward + description: "Settlement reward (ETH)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: tracking_code + description: "Account tracking code" data_type: text + tests: + - not_null - name: settler + description: "Address of the settler" data_type: text + tests: + - not_null - name: notional_trade_size + description: "Notional trade size (ETH)" data_type: numeric + tests: + - not_null - name: notional_position_size + description: "Notional position size (ETH)" data_type: numeric + tests: + - not_null - name: lp_fees + description: "LP fees (ETH)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: exchange_fees + description: "Exchange fees (ETH)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_perp_pnl_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: market_id - data_type: integer + description: "ID of the market" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_pnl data_type: numeric - name: fct_perp_orders_base_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: text + tests: + - not_null - name: order_type data_type: integer - name: size @@ -154,92 +380,228 @@ models: - name: fct_perp_markets_base_mainnet columns: - name: id - data_type: numeric + description: "Market ID" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: created_ts + description: "Market creation timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: market_name + description: "Market name" data_type: text + tests: + - not_null - name: fct_perp_market_history_base_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: price + description: "Price (ETH)" data_type: numeric + tests: + - not_null - name: skew + description: "Skew (ETH)" data_type: numeric + tests: + - not_null - name: size + description: "Size (ETH)" data_type: numeric + tests: + - not_null - name: size_delta + description: "Size delta (ETH)" data_type: numeric + tests: + - not_null - name: funding_rate + description: "Funding rate (ETH)" data_type: numeric + tests: + - not_null - name: funding_velocity + description: "Funding velocity (ETH)" data_type: numeric + tests: + - not_null - name: interest_rate + description: "Interest rate (ETH)" data_type: numeric + tests: + - not_null - name: funding_rate_apr + description: "Funding rate APR (ETH)" data_type: numeric + tests: + - not_null - name: long_rate_apr + description: "Long rate APR (ETH)" data_type: numeric + tests: + - not_null - name: short_rate_apr + description: "Short rate APR (ETH)" data_type: numeric + tests: + - not_null - name: size_usd + description: "Size (USD)" data_type: numeric + tests: + - not_null - name: long_oi + description: "Long open interest (ETH)" data_type: numeric - name: short_oi + description: "Short open interest (ETH)" data_type: numeric - name: long_oi_pct + description: "Long open interest (%)" data_type: numeric - name: short_oi_pct + description: "Short open interest (%)" data_type: numeric - name: fct_perp_liq_position_base_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: text + tests: + - not_null - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: amount_liquidated + description: "Amount liquidated" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: position_size + description: "Liquidated position size" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_perp_liq_account_base_mainnet columns: - name: account_id + description: "ID of the account" data_type: text + tests: + - not_null - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: total_reward + description: "Total reward" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_perp_accounts_base_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: created_ts + description: "Account creation timestamp" data_type: timestamp with time zone + tests: + - not_null - name: owner + description: "Address of the account owner" data_type: text + tests: + - not_null diff --git a/transformers/synthetix/models/marts/base/mainnet/prices/schema.yml b/transformers/synthetix/models/marts/base/mainnet/prices/schema.yml index be52b88b..47140acf 100644 --- a/transformers/synthetix/models/marts/base/mainnet/prices/schema.yml +++ b/transformers/synthetix/models/marts/base/mainnet/prices/schema.yml @@ -2,18 +2,45 @@ models: - name: fct_prices_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: market_address + description: "Market address" data_type: text + tests: + - not_null - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: price + description: "Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_prices_hourly_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: price + description: "Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/marts/base/mainnet/spot/schema.yml b/transformers/synthetix/models/marts/base/mainnet/spot/schema.yml index f6d3d78f..240644b5 100644 --- a/transformers/synthetix/models/marts/base/mainnet/spot/schema.yml +++ b/transformers/synthetix/models/marts/base/mainnet/spot/schema.yml @@ -2,52 +2,131 @@ models: - name: fct_synth_supply_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: synth_market_id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: supply + description: "Supply" data_type: numeric + tests: + - not_null - name: fct_spot_atomics_base_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: tx_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: price + description: "Price" data_type: numeric + tests: + - not_null - name: amount + description: "Amount" data_type: numeric + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: fct_spot_markets_base_mainnet columns: - name: id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: created_ts data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: token_address + description: "Token address" data_type: text + tests: + - not_null - name: fct_spot_wrapper_base_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: tx_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: amount_wrapped + description: "Amount wrapped" data_type: numeric + tests: + - not_null diff --git a/transformers/synthetix/models/marts/base/sepolia/buyback/schema.yml b/transformers/synthetix/models/marts/base/sepolia/buyback/schema.yml index cfcff8d7..08f547ff 100644 --- a/transformers/synthetix/models/marts/base/sepolia/buyback/schema.yml +++ b/transformers/synthetix/models/marts/base/sepolia/buyback/schema.yml @@ -2,38 +2,120 @@ models: - name: fct_buyback_daily_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: snx_amount + description: "Amount in SNX" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: usd_amount + description: "Amount in USD" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: cumulative_snx_amount + description: "Cumulative amount in SNX" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: cumulative_usd_amount + description: "Cumulative amount in USD" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_buyback_hourly_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: snx_amount + description: "Amount in SNX" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: usd_amount + description: "Amount in USD" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: cumulative_snx_amount + description: "Cumulative amount in SNX" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: cumulative_usd_amount + description: "Cumulative amount in USD" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_buyback_base_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: buyer + description: "Address of buyer" data_type: text + tests: + - not_null - name: snx + description: "Amount in SNX" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: usd + description: "Amount in USD" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: snx_price + description: "SNX Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/marts/base/sepolia/core/schema.yml b/transformers/synthetix/models/marts/base/sepolia/core/schema.yml index 8b5b7ca0..96448a3a 100644 --- a/transformers/synthetix/models/marts/base/sepolia/core/schema.yml +++ b/transformers/synthetix/models/marts/base/sepolia/core/schema.yml @@ -3,17 +3,41 @@ models: - name: fct_pool_rewards_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: token_symbol + description: "Token symbol" data_type: text + tests: + - not_null - name: amount + description: "Reward amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: ts_start data_type: timestamp with time zone - name: duration @@ -21,53 +45,141 @@ models: - name: fct_core_account_delegation_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: account_id - data_type: text + description: "ID of the account" + data_type: numeric + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: amount_delegated + description: "Amount of delegated collateral" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_core_apr_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: collateral_value + description: "Collateral value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: debt + description: "Debt value (USD)" data_type: numeric + tests: + - not_null - name: hourly_issuance + description: "Hourly issuance" data_type: numeric + tests: + - not_null - name: hourly_pnl + description: "Hourly PnL" data_type: numeric + tests: + - not_null - name: cumulative_pnl + description: "Cumulative PnL" data_type: numeric + tests: + - not_null - name: cumulative_issuance + description: "Cumulative Issuance" data_type: numeric + tests: + - not_null - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: hourly_pnl_pct + description: "Hourly PnL (%)" data_type: numeric + tests: + - not_null - name: hourly_rewards_pct - data_type: numeric + description: "Hourly Rewards (%)" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + max_value: 1 + inclusive: true - name: apr_24h + description: "APR (24h)" data_type: numeric + tests: + - not_null - name: apy_24h + description: "APY (24h)" data_type: numeric + tests: + - not_null - name: apr_7d + description: "APR (7d)" data_type: numeric + tests: + - not_null - name: apy_7d + description: "APY (7d)" data_type: numeric + tests: + - not_null - name: apr_28d + description: "APR (28d)" data_type: numeric + tests: + - not_null - name: apy_28d + description: "APY (28d)" data_type: numeric + tests: + - not_null - name: apr_24h_pnl data_type: numeric - name: apy_24h_pnl @@ -95,140 +207,372 @@ models: - name: fct_core_market_updated_base_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketCollateralWithdrawn", "MarketCollateralDeposited", "MarketUsdWithdrawn", "MarketUsdDeposited"] - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: credit_capacity + description: "Credit capacity" data_type: numeric + tests: + - not_null - name: net_issuance + description: "Net issuance" data_type: numeric + tests: + - not_null - name: token_amount + description: "Token amount" data_type: numeric + tests: + - not_null - name: fct_core_pool_collateral_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: amount_deposited + description: "Amount deposited" data_type: numeric + tests: + - not_null - name: fct_core_pool_delegation_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: amount_delegated data_type: numeric - name: fct_core_pools_base_sepolia columns: - name: id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: created_ts + description: "Pool creation timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: owner + description: "Address of the pool owner" data_type: text + tests: + - not_null - name: fct_pool_debt_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number - data_type: bigint - - name: pool_id + description: "Block number" data_type: integer + tests: + - not_null + - name: pool_id + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: debt + description: "Debt value (USD)" data_type: numeric + tests: + - not_null - name: fct_pool_issuance_hourly_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: hourly_issuance + description: "Hourly issuance" data_type: numeric + tests: + - not_null - name: fct_pool_issuance_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null - name: amount + description: "Amount issued" data_type: numeric + tests: + - not_null - name: fct_pool_pnl_hourly_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: collateral_value + description: "Collateral value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: debt + description: "Debt value (USD)" data_type: numeric + tests: + - not_null - name: hourly_issuance + description: "Hourly issuance" data_type: numeric + tests: + - not_null - name: hourly_pnl + description: "Hourly PnL" data_type: numeric + tests: + - not_null - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: hourly_pnl_pct + description: "Hourly PnL (%)" data_type: numeric + tests: + - not_null - name: hourly_rewards_pct - data_type: numeric + description: "Hourly Rewards (%)" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + max_value: 1 + inclusive: true - name: hourly_total_pct + description: "Hourly Total (%)" data_type: numeric + tests: + - not_null - name: fct_pool_rewards_hourly_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_pool_rewards_token_hourly_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: pool_id - data_type: integer + description: "ID of the pool" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type - data_type: character varying + description: "Type of delegated collateral" + data_type: text + tests: + - not_null - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: token_symbol + description: "Token symbol" data_type: text + tests: + - not_null - name: price + description: "Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: hourly_amount + description: "Hourly rewards amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: amount_distributed + description: "Distributed rewards amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: rewards_usd + description: "Rewards value (USD)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/marts/base/sepolia/perp/schema.yml b/transformers/synthetix/models/marts/base/sepolia/perp/schema.yml index 9f70f4c5..56a262d8 100644 --- a/transformers/synthetix/models/marts/base/sepolia/perp/schema.yml +++ b/transformers/synthetix/models/marts/base/sepolia/perp/schema.yml @@ -2,59 +2,154 @@ models: - name: fct_perp_interest_charged_base_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["InterestCharged"] - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: interest + description: "Interest amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_perp_collateral_modified_base_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["CollateralModified"] - name: synth_market_id + description: "Synth market ID" data_type: numeric - - name: sender + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true + - name: sender data_type: text + tests: + - not_null - name: amount_delta data_type: numeric - name: fct_perp_previous_order_expired_base_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["PreviousOrderExpired"] - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: commitment_time data_type: numeric - name: tracking_code @@ -66,77 +161,208 @@ models: - name: fct_perp_trades_base_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: text + tests: + - not_null - name: fill_price + description: "Fill price (ETH)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: pnl + description: "PnL (ETH)" data_type: numeric + tests: + - not_null - name: accrued_funding + description: "Accrued funding (ETH)" data_type: numeric + tests: + - not_null - name: trade_size + description: "Trade size (ETH)" data_type: numeric + tests: + - not_null - name: position_size + description: "Position size" data_type: numeric + tests: + - not_null - name: total_fees + description: "Total fees (ETH)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: referral_fees + description: "Referral fees (ETH)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collected_fees + description: "Collected fees (ETH)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: settlement_reward + description: "Settlement reward (ETH)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: tracking_code + description: "Account tracking code" data_type: text + tests: + - not_null - name: settler + description: "Address of the settler" data_type: text + tests: + - not_null - name: notional_trade_size + description: "Notional trade size (ETH)" data_type: numeric + tests: + - not_null - name: notional_position_size + description: "Notional position size (ETH)" data_type: numeric + tests: + - not_null - name: lp_fees + description: "LP fees (ETH)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: exchange_fees + description: "Exchange fees (ETH)" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_perp_pnl_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: market_id - data_type: integer + description: "ID of the market" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_pnl data_type: numeric - name: fct_perp_orders_base_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: text + tests: + - not_null - name: order_type data_type: integer - name: size @@ -154,92 +380,228 @@ models: - name: fct_perp_markets_base_sepolia columns: - name: id - data_type: numeric + description: "Market ID" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: created_ts + description: "Market creation timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: market_name + description: "Market name" data_type: text + tests: + - not_null - name: fct_perp_market_history_base_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: price + description: "Price (ETH)" data_type: numeric + tests: + - not_null - name: skew + description: "Skew (ETH)" data_type: numeric + tests: + - not_null - name: size + description: "Size (ETH)" data_type: numeric + tests: + - not_null - name: size_delta + description: "Size delta (ETH)" data_type: numeric + tests: + - not_null - name: funding_rate + description: "Funding rate (ETH)" data_type: numeric + tests: + - not_null - name: funding_velocity + description: "Funding velocity (ETH)" data_type: numeric + tests: + - not_null - name: interest_rate + description: "Interest rate (ETH)" data_type: numeric + tests: + - not_null - name: funding_rate_apr + description: "Funding rate APR (ETH)" data_type: numeric + tests: + - not_null - name: long_rate_apr + description: "Long rate APR (ETH)" data_type: numeric + tests: + - not_null - name: short_rate_apr + description: "Short rate APR (ETH)" data_type: numeric + tests: + - not_null - name: size_usd + description: "Size (USD)" data_type: numeric + tests: + - not_null - name: long_oi + description: "Long open interest (ETH)" data_type: numeric - name: short_oi + description: "Short open interest (ETH)" data_type: numeric - name: long_oi_pct + description: "Long open interest (%)" data_type: numeric - name: short_oi_pct + description: "Short open interest (%)" data_type: numeric - name: fct_perp_liq_position_base_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: text + tests: + - not_null - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: amount_liquidated + description: "Amount liquidated" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: position_size + description: "Liquidated position size" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_perp_liq_account_base_sepolia columns: - name: account_id + description: "ID of the account" data_type: text + tests: + - not_null - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: total_reward + description: "Total reward" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_perp_accounts_base_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: created_ts + description: "Account creation timestamp" data_type: timestamp with time zone + tests: + - not_null - name: owner + description: "Address of the account owner" data_type: text + tests: + - not_null diff --git a/transformers/synthetix/models/marts/base/sepolia/prices/schema.yml b/transformers/synthetix/models/marts/base/sepolia/prices/schema.yml index 11cb83cb..b4efc786 100644 --- a/transformers/synthetix/models/marts/base/sepolia/prices/schema.yml +++ b/transformers/synthetix/models/marts/base/sepolia/prices/schema.yml @@ -2,18 +2,45 @@ models: - name: fct_prices_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: market_address + description: "Market address" data_type: text + tests: + - not_null - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: price + description: "Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fct_prices_hourly_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: price + description: "Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/marts/base/sepolia/spot/schema.yml b/transformers/synthetix/models/marts/base/sepolia/spot/schema.yml index 26ad5883..b6c561f8 100644 --- a/transformers/synthetix/models/marts/base/sepolia/spot/schema.yml +++ b/transformers/synthetix/models/marts/base/sepolia/spot/schema.yml @@ -2,52 +2,131 @@ models: - name: fct_synth_supply_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: synth_market_id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: supply + description: "Supply" data_type: numeric + tests: + - not_null - name: fct_spot_atomics_base_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: tx_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: price + description: "Price" data_type: numeric + tests: + - not_null - name: amount + description: "Amount" data_type: numeric + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: fct_spot_markets_base_sepolia columns: - name: id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: created_ts data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: token_address + description: "Token address" data_type: text + tests: + - not_null - name: fct_spot_wrapper_base_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: tx_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "Synth market ID" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: amount_wrapped + description: "Amount wrapped" data_type: numeric + tests: + - not_null diff --git a/transformers/synthetix/models/raw/arbitrum/mainnet/core/schema.yml b/transformers/synthetix/models/raw/arbitrum/mainnet/core/schema.yml index 55b8d46f..145e7a9d 100644 --- a/transformers/synthetix/models/raw/arbitrum/mainnet/core/schema.yml +++ b/transformers/synthetix/models/raw/arbitrum/mainnet/core/schema.yml @@ -4,387 +4,939 @@ models: description: AccountCreated events from the CoreProxy contract columns: - name: owner + description: "Address of the account owner" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["AccountCreated"] - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: core_delegation_updated_arbitrum_mainnet description: DelegationUpdated events from the CoreProxy contract columns: - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the delegator" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: leverage + description: "Leverage" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 1000000000000000000 + max_value: 1000000000000000000 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: amount + description: "Amount delegated" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["DelegationUpdated"] - name: core_deposited_arbitrum_mainnet description: Deposited events from the CoreProxy contract columns: - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["Deposited"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the depositor" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: token_amount + description: "Token amount deposited" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_withdrawn_arbitrum_mainnet description: Withdrawn events from the CoreProxy contract columns: - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: token_amount + description: "Token amount withdrawn" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: sender + description: "Address of the withdrawer" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["Withdrawn"] - name: core_liquidation_arbitrum_mainnet description: Liquidation events from the CoreProxy contract columns: - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["Liquidation"] - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: sender + description: "Address of the liquidator" data_type: text + tests: + - not_null - name: liquidation_data data_type: jsonb - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: liquidate_as_account_id data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_market_updated_arbitrum_mainnet - description: Combination of MarketCollateralDeposited, - MarketCollateralWithdrawn, MarketUsdDeposited, MarketUsdWithdrawn events - from the CoreProxy contract + description: > + Combination of MarketCollateralDeposited, MarketCollateralWithdrawn, + MarketUsdDeposited, MarketUsdWithdrawn events from the CoreProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketCollateralWithdrawn", "MarketCollateralDeposited", "MarketUsdWithdrawn", "MarketUsdDeposited"] - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: net_issuance + description: "Net issuance" data_type: numeric + tests: + - not_null - name: deposited_collateral_value + description: "Deposited collateral value" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: credit_capacity + description: "Credit capacity" data_type: numeric + tests: + - not_null - name: token_amount + description: "Token amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_market_registered_arbitrum_mainnet description: MarketRegistered events from the CoreProxy contract columns: - name: market + description: "Market name" data_type: text + tests: + - not_null - name: market_id + description: "Market ID" data_type: numeric + tests: + - not_null + - unique - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketRegistered"] - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: core_pool_created_arbitrum_mainnet - description: PoolCreated events from the CoreProxy contract + description: "PoolCreated events from the CoreProxy contract" columns: - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["PoolCreated"] - name: owner + description: "Address of the pool owner" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_rewards_claimed_arbitrum_mainnet description: RewardsClaimed events from the CoreProxy contract columns: - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["RewardsClaimed"] - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: amount + description: "Amount delegated" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: core_rewards_distributed_arbitrum_mainnet description: RewardsDistributed events from the CoreProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["RewardsDistributed"] - name: amount + description: "Amount claimed" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: start + description: "UNIX timestamp" data_type: numeric - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: duration + description: "Duration in seconds" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_usd_burned_arbitrum_mainnet description: UsdBurned events from the CoreProxy contract columns: - name: amount + description: "Amount burned" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["UsdBurned"] - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: core_usd_minted_arbitrum_mainnet description: UsdMinted events from the CoreProxy contract columns: - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: amount + description: "Amount minted" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["UsdMinted"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: core_vault_liquidation_arbitrum_mainnet description: VaultLiquidation events from the CoreProxy contract columns: - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["VaultLiquidation"] - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: liquidate_as_account_id data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: liquidation_data data_type: jsonb + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: core_vault_collateral_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: bigint - - name: contract_address - data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: integer + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: character varying + tests: + - not_null - name: amount + description: "Collateral amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_value + description: "Vault collateral value" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true + - name: contract_address + description: "Address of the contract" + data_type: text + tests: + - not_null - name: core_vault_debt_arbitrum_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: bigint - - name: contract_address - data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: integer + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: character varying + tests: + - not_null - name: debt + description: "Vault debt" data_type: numeric + tests: + - not_null + - name: contract_address + description: "Address of the contract" + data_type: text + tests: + - not_null diff --git a/transformers/synthetix/models/raw/arbitrum/mainnet/schema.yml b/transformers/synthetix/models/raw/arbitrum/mainnet/schema.yml index 088a8162..1c1a0295 100644 --- a/transformers/synthetix/models/raw/arbitrum/mainnet/schema.yml +++ b/transformers/synthetix/models/raw/arbitrum/mainnet/schema.yml @@ -2,13 +2,18 @@ version: 2 models: - name: blocks_arbitrum_mainnet description: Block numbers and timestamps + tests: + - dbt_utils.recency: + datepart: hour + field: ts + interval: 1 columns: - name: ts description: UTC timestamp data_type: timestamp with time zone - name: block_number - data_type: integer description: Block height + data_type: integer tests: - not_null - unique diff --git a/transformers/synthetix/models/raw/arbitrum/mainnet/spot/schema.yml b/transformers/synthetix/models/raw/arbitrum/mainnet/spot/schema.yml index e2c62702..dc3b65eb 100644 --- a/transformers/synthetix/models/raw/arbitrum/mainnet/spot/schema.yml +++ b/transformers/synthetix/models/raw/arbitrum/mainnet/spot/schema.yml @@ -4,223 +4,522 @@ models: description: OrderCommitted events from the SpotMarketProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderCommitted"] - name: sender + description: "Address of the delegator" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: amount_provided + description: "Amount provided" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: async_order_id + description: "Async order ID" data_type: numeric - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: order_type + description: "Type of order" data_type: integer + tests: + - not_null - name: spot_order_settled_arbitrum_mainnet description: OrderSettled events from the SpotMarketProxy contract columns: - name: final_order_amount + description: "Final order amount" data_type: numeric + tests: + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: settler + description: "Address of the settler" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: async_order_id + description: "Async order ID" data_type: numeric - name: order_type + description: "Type of order" data_type: integer + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: price + description: "Synth price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collected_fees + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fees + description: "Fees data" data_type: jsonb - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderSettled"] - name: spot_order_cancelled_arbitrum_mainnet description: OrderCancelled events from the SpotMarketProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: async_order_claim + description: "Async order clain" data_type: jsonb - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: sender + description: "Address of the delegator" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderCancelled"] - name: async_order_id + description: "Async order ID" data_type: numeric - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: spot_synth_registered_arbitrum_mainnet description: SynthRegistered events from the SpotMarketProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: synth_token_address + description: "Address of the synth token" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthRegistered"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: spot_synth_bought_arbitrum_mainnet description: SynthBought events from the SpotMarketProxy contract columns: - name: collected_fees + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: price + description: "Synth price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: fees + description: "Fees data" data_type: jsonb - name: synth_returned data_type: numeric - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthBought"] - name: spot_synth_sold_arbitrum_mainnet description: SynthSold events from the SpotMarketProxy contract columns: - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthSold"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: collected_fees + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: fees + description: "Fees data" data_type: jsonb - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: price + description: "Synth price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: amount_returned + description: "Amount returned" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: spot_synth_wrapped_arbitrum_mainnet description: SynthWrapped events from the SpotMarketProxy contract columns: - name: fees + description: "Fees data" data_type: jsonb - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthWrapped"] - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: amount_wrapped data_type: numeric - name: fees_collected + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: spot_synth_unwrapped_arbitrum_mainnet description: SynthUnwrapped events from the SpotMarketProxy contract columns: - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: amount_unwrapped + description: "Amount of synth unwrapped" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fees_collected + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthUnwrapped"] - name: fees + description: "Fees data" data_type: jsonb - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/raw/arbitrum/sepolia/core/schema.yml b/transformers/synthetix/models/raw/arbitrum/sepolia/core/schema.yml index 14b9b786..60f7801c 100644 --- a/transformers/synthetix/models/raw/arbitrum/sepolia/core/schema.yml +++ b/transformers/synthetix/models/raw/arbitrum/sepolia/core/schema.yml @@ -4,387 +4,939 @@ models: description: AccountCreated events from the CoreProxy contract columns: - name: owner + description: "Address of the account owner" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["AccountCreated"] - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: core_delegation_updated_arbitrum_sepolia description: DelegationUpdated events from the CoreProxy contract columns: - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the delegator" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: leverage + description: "Leverage" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 1000000000000000000 + max_value: 1000000000000000000 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: amount + description: "Amount delegated" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["DelegationUpdated"] - name: core_deposited_arbitrum_sepolia description: Deposited events from the CoreProxy contract columns: - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["Deposited"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the depositor" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: token_amount + description: "Token amount deposited" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_withdrawn_arbitrum_sepolia description: Withdrawn events from the CoreProxy contract columns: - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: token_amount + description: "Token amount withdrawn" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: sender + description: "Address of the withdrawer" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["Withdrawn"] - name: core_liquidation_arbitrum_sepolia description: Liquidation events from the CoreProxy contract columns: - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["Liquidation"] - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: sender + description: "Address of the liquidator" data_type: text + tests: + - not_null - name: liquidation_data data_type: jsonb - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: liquidate_as_account_id data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_market_updated_arbitrum_sepolia - description: Combination of MarketCollateralDeposited, - MarketCollateralWithdrawn, MarketUsdDeposited, MarketUsdWithdrawn events - from the CoreProxy contract + description: > + Combination of MarketCollateralDeposited, MarketCollateralWithdrawn, + MarketUsdDeposited, MarketUsdWithdrawn events from the CoreProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketCollateralWithdrawn", "MarketCollateralDeposited", "MarketUsdWithdrawn", "MarketUsdDeposited"] - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: net_issuance + description: "Net issuance" data_type: numeric + tests: + - not_null - name: deposited_collateral_value + description: "Deposited collateral value" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: credit_capacity + description: "Credit capacity" data_type: numeric + tests: + - not_null - name: token_amount + description: "Token amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_market_registered_arbitrum_sepolia description: MarketRegistered events from the CoreProxy contract columns: - name: market + description: "Market name" data_type: text + tests: + - not_null - name: market_id + description: "Market ID" data_type: numeric + tests: + - not_null + - unique - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketRegistered"] - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: core_pool_created_arbitrum_sepolia - description: PoolCreated events from the CoreProxy contract + description: "PoolCreated events from the CoreProxy contract" columns: - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["PoolCreated"] - name: owner + description: "Address of the pool owner" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_rewards_claimed_arbitrum_sepolia description: RewardsClaimed events from the CoreProxy contract columns: - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["RewardsClaimed"] - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: amount + description: "Amount delegated" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: core_rewards_distributed_arbitrum_sepolia description: RewardsDistributed events from the CoreProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["RewardsDistributed"] - name: amount + description: "Amount claimed" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: start + description: "UNIX timestamp" data_type: numeric - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: duration + description: "Duration in seconds" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_usd_burned_arbitrum_sepolia description: UsdBurned events from the CoreProxy contract columns: - name: amount + description: "Amount burned" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["UsdBurned"] - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: core_usd_minted_arbitrum_sepolia description: UsdMinted events from the CoreProxy contract columns: - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: amount + description: "Amount minted" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["UsdMinted"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: core_vault_liquidation_arbitrum_sepolia description: VaultLiquidation events from the CoreProxy contract columns: - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["VaultLiquidation"] - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: liquidate_as_account_id data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: liquidation_data data_type: jsonb + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: core_vault_collateral_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: bigint - - name: contract_address - data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: integer + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: character varying + tests: + - not_null - name: amount + description: "Collateral amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_value + description: "Vault collateral value" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true + - name: contract_address + description: "Address of the contract" + data_type: text + tests: + - not_null - name: core_vault_debt_arbitrum_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: bigint - - name: contract_address - data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: integer + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: character varying + tests: + - not_null - name: debt + description: "Vault debt" data_type: numeric + tests: + - not_null + - name: contract_address + description: "Address of the contract" + data_type: text + tests: + - not_null diff --git a/transformers/synthetix/models/raw/arbitrum/sepolia/schema.yml b/transformers/synthetix/models/raw/arbitrum/sepolia/schema.yml index 6df24d1d..5f45e213 100644 --- a/transformers/synthetix/models/raw/arbitrum/sepolia/schema.yml +++ b/transformers/synthetix/models/raw/arbitrum/sepolia/schema.yml @@ -2,13 +2,18 @@ version: 2 models: - name: blocks_arbitrum_sepolia description: Block numbers and timestamps + tests: + - dbt_utils.recency: + datepart: hour + field: ts + interval: 1 columns: - name: ts description: UTC timestamp data_type: timestamp with time zone - name: block_number - data_type: integer description: Block height + data_type: integer tests: - not_null - unique diff --git a/transformers/synthetix/models/raw/arbitrum/sepolia/spot/schema.yml b/transformers/synthetix/models/raw/arbitrum/sepolia/spot/schema.yml index 8d838d59..70121a81 100644 --- a/transformers/synthetix/models/raw/arbitrum/sepolia/spot/schema.yml +++ b/transformers/synthetix/models/raw/arbitrum/sepolia/spot/schema.yml @@ -4,223 +4,522 @@ models: description: OrderCommitted events from the SpotMarketProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderCommitted"] - name: sender + description: "Address of the delegator" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: amount_provided + description: "Amount provided" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: async_order_id + description: "Async order ID" data_type: numeric - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: order_type + description: "Type of order" data_type: integer + tests: + - not_null - name: spot_order_settled_arbitrum_sepolia description: OrderSettled events from the SpotMarketProxy contract columns: - name: final_order_amount + description: "Final order amount" data_type: numeric + tests: + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: settler + description: "Address of the settler" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: async_order_id + description: "Async order ID" data_type: numeric - name: order_type + description: "Type of order" data_type: integer + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: price + description: "Synth price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collected_fees + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fees + description: "Fees data" data_type: jsonb - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderSettled"] - name: spot_order_cancelled_arbitrum_sepolia description: OrderCancelled events from the SpotMarketProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: async_order_claim + description: "Async order clain" data_type: jsonb - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: sender + description: "Address of the delegator" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderCancelled"] - name: async_order_id + description: "Async order ID" data_type: numeric - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: spot_synth_registered_arbitrum_sepolia description: SynthRegistered events from the SpotMarketProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: synth_token_address + description: "Address of the synth token" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthRegistered"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: spot_synth_bought_arbitrum_sepolia description: SynthBought events from the SpotMarketProxy contract columns: - name: collected_fees + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: price + description: "Synth price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: fees + description: "Fees data" data_type: jsonb - name: synth_returned data_type: numeric - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthBought"] - name: spot_synth_sold_arbitrum_sepolia description: SynthSold events from the SpotMarketProxy contract columns: - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthSold"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: collected_fees + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: fees + description: "Fees data" data_type: jsonb - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: price + description: "Synth price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: amount_returned + description: "Amount returned" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: spot_synth_wrapped_arbitrum_sepolia description: SynthWrapped events from the SpotMarketProxy contract columns: - name: fees + description: "Fees data" data_type: jsonb - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthWrapped"] - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: amount_wrapped data_type: numeric - name: fees_collected + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: spot_synth_unwrapped_arbitrum_sepolia description: SynthUnwrapped events from the SpotMarketProxy contract columns: - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: amount_unwrapped + description: "Amount of synth unwrapped" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fees_collected + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthUnwrapped"] - name: fees + description: "Fees data" data_type: jsonb - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/raw/base/mainnet/buyback/schema.yml b/transformers/synthetix/models/raw/base/mainnet/buyback/schema.yml index a687ac11..df2905fa 100644 --- a/transformers/synthetix/models/raw/base/mainnet/buyback/schema.yml +++ b/transformers/synthetix/models/raw/base/mainnet/buyback/schema.yml @@ -2,20 +2,56 @@ models: - name: buyback_processed_base_mainnet columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["BuybackProcessed"] - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: buyer + description: "Address of the buyer" data_type: text + tests: + - not_null - name: snx + description: "Amount in SNX" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: usd + description: "Value in USD" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/raw/base/mainnet/core/schema.yml b/transformers/synthetix/models/raw/base/mainnet/core/schema.yml index 0e44e972..cffe9f83 100644 --- a/transformers/synthetix/models/raw/base/mainnet/core/schema.yml +++ b/transformers/synthetix/models/raw/base/mainnet/core/schema.yml @@ -4,387 +4,939 @@ models: description: AccountCreated events from the CoreProxy contract columns: - name: owner + description: "Address of the account owner" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["AccountCreated"] - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: core_delegation_updated_base_mainnet description: DelegationUpdated events from the CoreProxy contract columns: - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the delegator" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: leverage + description: "Leverage" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 1000000000000000000 + max_value: 1000000000000000000 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: amount + description: "Amount delegated" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["DelegationUpdated"] - name: core_deposited_base_mainnet description: Deposited events from the CoreProxy contract columns: - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["Deposited"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the depositor" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: token_amount + description: "Token amount deposited" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_withdrawn_base_mainnet description: Withdrawn events from the CoreProxy contract columns: - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: token_amount + description: "Token amount withdrawn" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: sender + description: "Address of the withdrawer" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["Withdrawn"] - name: core_liquidation_base_mainnet description: Liquidation events from the CoreProxy contract columns: - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["Liquidation"] - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: sender + description: "Address of the liquidator" data_type: text + tests: + - not_null - name: liquidation_data data_type: jsonb - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: liquidate_as_account_id data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_market_updated_base_mainnet - description: Combination of MarketCollateralDeposited, - MarketCollateralWithdrawn, MarketUsdDeposited, MarketUsdWithdrawn events - from the CoreProxy contract + description: > + Combination of MarketCollateralDeposited, MarketCollateralWithdrawn, + MarketUsdDeposited, MarketUsdWithdrawn events from the CoreProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketCollateralWithdrawn", "MarketCollateralDeposited", "MarketUsdWithdrawn", "MarketUsdDeposited"] - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: net_issuance + description: "Net issuance" data_type: numeric + tests: + - not_null - name: deposited_collateral_value + description: "Deposited collateral value" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: credit_capacity + description: "Credit capacity" data_type: numeric + tests: + - not_null - name: token_amount + description: "Token amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_market_registered_base_mainnet description: MarketRegistered events from the CoreProxy contract columns: - name: market + description: "Market name" data_type: text + tests: + - not_null - name: market_id + description: "Market ID" data_type: numeric + tests: + - not_null + - unique - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketRegistered"] - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: core_pool_created_base_mainnet - description: PoolCreated events from the CoreProxy contract + description: "PoolCreated events from the CoreProxy contract" columns: - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["PoolCreated"] - name: owner + description: "Address of the pool owner" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_rewards_claimed_base_mainnet description: RewardsClaimed events from the CoreProxy contract columns: - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["RewardsClaimed"] - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: amount + description: "Amount delegated" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: core_rewards_distributed_base_mainnet description: RewardsDistributed events from the CoreProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["RewardsDistributed"] - name: amount + description: "Amount claimed" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: start + description: "UNIX timestamp" data_type: numeric - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: duration + description: "Duration in seconds" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_usd_burned_base_mainnet description: UsdBurned events from the CoreProxy contract columns: - name: amount + description: "Amount burned" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["UsdBurned"] - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: core_usd_minted_base_mainnet description: UsdMinted events from the CoreProxy contract columns: - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: amount + description: "Amount minted" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["UsdMinted"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: core_vault_liquidation_base_mainnet description: VaultLiquidation events from the CoreProxy contract columns: - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["VaultLiquidation"] - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: liquidate_as_account_id data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: liquidation_data data_type: jsonb + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: core_vault_collateral_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: bigint - - name: contract_address - data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: integer + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: character varying + tests: + - not_null - name: amount + description: "Collateral amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_value + description: "Vault collateral value" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true + - name: contract_address + description: "Address of the contract" + data_type: text + tests: + - not_null - name: core_vault_debt_base_mainnet columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: bigint - - name: contract_address - data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: integer + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: character varying + tests: + - not_null - name: debt + description: "Vault debt" data_type: numeric + tests: + - not_null + - name: contract_address + description: "Address of the contract" + data_type: text + tests: + - not_null diff --git a/transformers/synthetix/models/raw/base/mainnet/perp/schema.yml b/transformers/synthetix/models/raw/base/mainnet/perp/schema.yml index 2079515d..9855abd6 100644 --- a/transformers/synthetix/models/raw/base/mainnet/perp/schema.yml +++ b/transformers/synthetix/models/raw/base/mainnet/perp/schema.yml @@ -4,31 +4,101 @@ models: description: AccountCreated events from the PerpsMarketProxy contract columns: - name: id + description: "ID of the event record" tests: - unique - not_null + - name: event_name + description: "Event name" + data_type: text + tests: + - not_null + - accepted_values: + values: ["AccountCreated"] + - name: block_number + description: "Block number" + data_type: integer + tests: + - not_null + - name: block_timestamp + description: "Block timestamp" + data_type: timestamp with time zone + tests: + - not_null + - name: owner + description: "Address of the pool owner" + data_type: text + tests: + - not_null + - name: account_id + description: "ID of the account" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true + - name: transaction_hash + description: "Transaction hash" + data_type: text + tests: + - not_null + - name: contract + description: "Address of the contract" + data_type: text + tests: + - not_null - name: perp_order_committed_base_mainnet description: OrderCommitted events from the PerpsMarketProxy contract columns: - name: id - data_type: character varying + description: "ID of the event record" tests: - - not_null - unique + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderCommitted"] - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: commitment_time data_type: numeric - name: expiration_time @@ -51,11 +121,19 @@ models: description: OrderSettled events from the PerpsMarketProxy contract columns: - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: fill_price data_type: numeric - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderSettled"] - name: settlement_reward data_type: numeric - name: settler @@ -67,19 +145,46 @@ models: - name: pnl data_type: numeric - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collected_fees + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: size_delta data_type: numeric - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: accrued_funding data_type: numeric - name: referral_fees @@ -87,32 +192,61 @@ models: - name: new_size data_type: numeric - name: id - data_type: character varying + description: "ID of the event record" tests: - - not_null - unique + - not_null - name: perp_market_updated_base_mainnet description: MarketUpdated events from the PerpsMarketProxy contract columns: - name: id - data_type: character varying + description: "ID of the event record" tests: - - not_null - unique + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketUpdated"] - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: price + description: "Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: skew data_type: numeric - name: size @@ -124,166 +258,400 @@ models: - name: current_funding_velocity data_type: numeric - name: interest_rate + description: "Interest rate" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: perp_position_liquidated_base_mainnet description: PositionLiquidated events from the PerpsMarketProxy contract columns: - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_id + description: "ID of the market" data_type: numeric - - name: id - data_type: character varying tests: - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true + - name: id + description: "ID of the event record" + tests: - unique + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: current_position_size + description: "Current position size" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["PositionLiquidated"] - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: amount_liquidated + description: "Amount liquidated" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: perp_account_liquidation_attempt_base_mainnet - description: AccountLiquidationAttemp events from the PerpsMarketProxy contract + description: AccountLiquidationAttempt events from the PerpsMarketProxy contract columns: - name: id - data_type: character varying + description: "ID of the event record" tests: - - not_null - unique + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: reward + description: "Reward" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["AccountLiquidationAttempt"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: full_liquidation + description: "Whether it is a full or partial liquidation" data_type: boolean + tests: + - not_null - name: perp_collateral_modified_base_mainnet description: CollateralModified events from the PerpsMarketProxy contract columns: - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["CollateralModified"] - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: amount_delta data_type: numeric - name: synth_market_id + description: "ID of the synth market" data_type: numeric - - name: id - data_type: character varying tests: - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true + - name: id + description: "ID of the event record" + tests: - unique + - not_null - name: sender + description: "Sender address" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: perp_previous_order_expired_base_mainnet description: PreviousOrderExpired events from the PerpsMarketProxy contract columns: - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: tracking_code + description: "Tracking code" data_type: text - name: id - data_type: character varying + description: "ID of the event record" tests: - - not_null - unique + - not_null - name: size_delta data_type: numeric - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["PreviousOrderExpired"] - name: commitment_time data_type: numeric - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: acceptable_price data_type: numeric - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: perp_market_created_base_mainnet + description: MarketCreated events from the PerpsMarketProxy contract columns: - name: market_name + description: "Market name" data_type: text + tests: + - not_null - name: id - data_type: character varying + description: "ID of the event record" + tests: + - unique + - not_null - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketCreated"] - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: perps_market_id + description: "ID of the perps market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: perp_interest_charged_base_mainnet + description: InterestCharged events from the PerpsMarketProxy contract columns: - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["InterestCharged"] - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id - data_type: character varying + description: "ID of the event record" + tests: + - unique + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: interest data_type: numeric - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: perp_interest_rate_updated_base_mainnet + description: InterestRateUpdated events from the PerpsMarketProxy contract columns: - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["InterestRateUpdated"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: interest_rate + description: "Interest rate" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: id - data_type: character varying + description: "ID of the event record" + tests: + - unique + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: super_market_id + description: "ID of the super market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/raw/base/mainnet/schema.yml b/transformers/synthetix/models/raw/base/mainnet/schema.yml index f4d24a44..a56c30ab 100644 --- a/transformers/synthetix/models/raw/base/mainnet/schema.yml +++ b/transformers/synthetix/models/raw/base/mainnet/schema.yml @@ -2,13 +2,18 @@ version: 2 models: - name: blocks_base_mainnet description: Block numbers and timestamps + tests: + - dbt_utils.recency: + datepart: hour + field: ts + interval: 1 columns: - name: ts description: UTC timestamp data_type: timestamp with time zone - name: block_number - data_type: integer description: Block height + data_type: integer tests: - not_null - unique diff --git a/transformers/synthetix/models/raw/base/mainnet/spot/schema.yml b/transformers/synthetix/models/raw/base/mainnet/spot/schema.yml index 56c428aa..ea2fe5f6 100644 --- a/transformers/synthetix/models/raw/base/mainnet/spot/schema.yml +++ b/transformers/synthetix/models/raw/base/mainnet/spot/schema.yml @@ -4,223 +4,522 @@ models: description: OrderCommitted events from the SpotMarketProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderCommitted"] - name: sender + description: "Address of the delegator" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: amount_provided + description: "Amount provided" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: async_order_id + description: "Async order ID" data_type: numeric - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: order_type + description: "Type of order" data_type: integer + tests: + - not_null - name: spot_order_settled_base_mainnet description: OrderSettled events from the SpotMarketProxy contract columns: - name: final_order_amount + description: "Final order amount" data_type: numeric + tests: + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: settler + description: "Address of the settler" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: async_order_id + description: "Async order ID" data_type: numeric - name: order_type + description: "Type of order" data_type: integer + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: price + description: "Synth price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collected_fees + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fees + description: "Fees data" data_type: jsonb - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderSettled"] - name: spot_order_cancelled_base_mainnet description: OrderCancelled events from the SpotMarketProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: async_order_claim + description: "Async order clain" data_type: jsonb - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: sender + description: "Address of the delegator" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderCancelled"] - name: async_order_id + description: "Async order ID" data_type: numeric - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: spot_synth_registered_base_mainnet description: SynthRegistered events from the SpotMarketProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: synth_token_address + description: "Address of the synth token" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthRegistered"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: spot_synth_bought_base_mainnet description: SynthBought events from the SpotMarketProxy contract columns: - name: collected_fees + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: price + description: "Synth price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: fees + description: "Fees data" data_type: jsonb - name: synth_returned data_type: numeric - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthBought"] - name: spot_synth_sold_base_mainnet description: SynthSold events from the SpotMarketProxy contract columns: - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthSold"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: collected_fees + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: fees + description: "Fees data" data_type: jsonb - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: price + description: "Synth price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: amount_returned + description: "Amount returned" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: spot_synth_wrapped_base_mainnet description: SynthWrapped events from the SpotMarketProxy contract columns: - name: fees + description: "Fees data" data_type: jsonb - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthWrapped"] - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: amount_wrapped data_type: numeric - name: fees_collected + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: spot_synth_unwrapped_base_mainnet description: SynthUnwrapped events from the SpotMarketProxy contract columns: - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: amount_unwrapped + description: "Amount of synth unwrapped" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fees_collected + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthUnwrapped"] - name: fees + description: "Fees data" data_type: jsonb - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/raw/base/sepolia/buyback/schema.yml b/transformers/synthetix/models/raw/base/sepolia/buyback/schema.yml index e86cec9b..f35fb22d 100644 --- a/transformers/synthetix/models/raw/base/sepolia/buyback/schema.yml +++ b/transformers/synthetix/models/raw/base/sepolia/buyback/schema.yml @@ -2,20 +2,56 @@ models: - name: buyback_processed_base_sepolia columns: - name: id + description: "ID of the event record" data_type: character varying + tests: + - not_null + - unique - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["BuybackProcessed"] - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: buyer + description: "Address of the buyer" data_type: text + tests: + - not_null - name: snx + description: "Amount in SNX" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: usd + description: "Value in USD" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/raw/base/sepolia/core/schema.yml b/transformers/synthetix/models/raw/base/sepolia/core/schema.yml index 9c7e24d3..ae561d14 100644 --- a/transformers/synthetix/models/raw/base/sepolia/core/schema.yml +++ b/transformers/synthetix/models/raw/base/sepolia/core/schema.yml @@ -4,387 +4,939 @@ models: description: AccountCreated events from the CoreProxy contract columns: - name: owner + description: "Address of the account owner" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["AccountCreated"] - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: core_delegation_updated_base_sepolia description: DelegationUpdated events from the CoreProxy contract columns: - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the delegator" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: leverage + description: "Leverage" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 1000000000000000000 + max_value: 1000000000000000000 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: amount + description: "Amount delegated" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["DelegationUpdated"] - name: core_deposited_base_sepolia description: Deposited events from the CoreProxy contract columns: - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["Deposited"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the depositor" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: token_amount + description: "Token amount deposited" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_withdrawn_base_sepolia description: Withdrawn events from the CoreProxy contract columns: - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: token_amount + description: "Token amount withdrawn" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: sender + description: "Address of the withdrawer" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["Withdrawn"] - name: core_liquidation_base_sepolia description: Liquidation events from the CoreProxy contract columns: - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["Liquidation"] - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: sender + description: "Address of the liquidator" data_type: text + tests: + - not_null - name: liquidation_data data_type: jsonb - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: liquidate_as_account_id data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_market_updated_base_sepolia - description: Combination of MarketCollateralDeposited, - MarketCollateralWithdrawn, MarketUsdDeposited, MarketUsdWithdrawn events - from the CoreProxy contract + description: > + Combination of MarketCollateralDeposited, MarketCollateralWithdrawn, + MarketUsdDeposited, MarketUsdWithdrawn events from the CoreProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketCollateralWithdrawn", "MarketCollateralDeposited", "MarketUsdWithdrawn", "MarketUsdDeposited"] - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: net_issuance + description: "Net issuance" data_type: numeric + tests: + - not_null - name: deposited_collateral_value + description: "Deposited collateral value" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: credit_capacity + description: "Credit capacity" data_type: numeric + tests: + - not_null - name: token_amount + description: "Token amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_market_registered_base_sepolia description: MarketRegistered events from the CoreProxy contract columns: - name: market + description: "Market name" data_type: text + tests: + - not_null - name: market_id + description: "Market ID" data_type: numeric + tests: + - not_null + - unique - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketRegistered"] - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: core_pool_created_base_sepolia - description: PoolCreated events from the CoreProxy contract + description: "PoolCreated events from the CoreProxy contract" columns: - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["PoolCreated"] - name: owner + description: "Address of the pool owner" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_rewards_claimed_base_sepolia description: RewardsClaimed events from the CoreProxy contract columns: - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["RewardsClaimed"] - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: amount + description: "Amount delegated" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: core_rewards_distributed_base_sepolia description: RewardsDistributed events from the CoreProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["RewardsDistributed"] - name: amount + description: "Amount claimed" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: start + description: "UNIX timestamp" data_type: numeric - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: duration + description: "Duration in seconds" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: distributor + description: "Address of the distributor" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: core_usd_burned_base_sepolia description: UsdBurned events from the CoreProxy contract columns: - name: amount + description: "Amount burned" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["UsdBurned"] - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: core_usd_minted_base_sepolia description: UsdMinted events from the CoreProxy contract columns: - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: amount + description: "Amount minted" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["UsdMinted"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: core_vault_liquidation_base_sepolia description: VaultLiquidation events from the CoreProxy contract columns: - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: collateral_type + description: "Type of delegated collateral" data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["VaultLiquidation"] - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: liquidate_as_account_id data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: liquidation_data data_type: jsonb + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: sender + description: "Address of the event initiator" data_type: text + tests: + - not_null - name: core_vault_collateral_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: bigint - - name: contract_address - data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: integer + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: character varying + tests: + - not_null - name: amount + description: "Collateral amount" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_value + description: "Vault collateral value" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true + - name: contract_address + description: "Address of the contract" + data_type: text + tests: + - not_null - name: core_vault_debt_base_sepolia columns: - name: ts + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: bigint - - name: contract_address - data_type: text + tests: + - not_null - name: pool_id + description: "ID of the pool" data_type: integer + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collateral_type + description: "Type of delegated collateral" data_type: character varying + tests: + - not_null - name: debt + description: "Vault debt" data_type: numeric + tests: + - not_null + - name: contract_address + description: "Address of the contract" + data_type: text + tests: + - not_null diff --git a/transformers/synthetix/models/raw/base/sepolia/perp/schema.yml b/transformers/synthetix/models/raw/base/sepolia/perp/schema.yml index 19974871..09df7ff6 100644 --- a/transformers/synthetix/models/raw/base/sepolia/perp/schema.yml +++ b/transformers/synthetix/models/raw/base/sepolia/perp/schema.yml @@ -4,31 +4,101 @@ models: description: AccountCreated events from the PerpsMarketProxy contract columns: - name: id + description: "ID of the event record" tests: - unique - not_null + - name: event_name + description: "Event name" + data_type: text + tests: + - not_null + - accepted_values: + values: ["AccountCreated"] + - name: block_number + description: "Block number" + data_type: integer + tests: + - not_null + - name: block_timestamp + description: "Block timestamp" + data_type: timestamp with time zone + tests: + - not_null + - name: owner + description: "Address of the pool owner" + data_type: text + tests: + - not_null + - name: account_id + description: "ID of the account" + data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true + - name: transaction_hash + description: "Transaction hash" + data_type: text + tests: + - not_null + - name: contract + description: "Address of the contract" + data_type: text + tests: + - not_null - name: perp_order_committed_base_sepolia description: OrderCommitted events from the PerpsMarketProxy contract columns: - name: id - data_type: character varying + description: "ID of the event record" tests: - - not_null - unique + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderCommitted"] - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: commitment_time data_type: numeric - name: expiration_time @@ -51,11 +121,19 @@ models: description: OrderSettled events from the PerpsMarketProxy contract columns: - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: fill_price data_type: numeric - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderSettled"] - name: settlement_reward data_type: numeric - name: settler @@ -67,19 +145,46 @@ models: - name: pnl data_type: numeric - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collected_fees + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: size_delta data_type: numeric - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: accrued_funding data_type: numeric - name: referral_fees @@ -87,32 +192,61 @@ models: - name: new_size data_type: numeric - name: id - data_type: character varying + description: "ID of the event record" tests: - - not_null - unique + - not_null - name: perp_market_updated_base_sepolia description: MarketUpdated events from the PerpsMarketProxy contract columns: - name: id - data_type: character varying + description: "ID of the event record" tests: - - not_null - unique + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketUpdated"] - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: price + description: "Price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: skew data_type: numeric - name: size @@ -124,166 +258,400 @@ models: - name: current_funding_velocity data_type: numeric - name: interest_rate + description: "Interest rate" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: perp_position_liquidated_base_sepolia description: PositionLiquidated events from the PerpsMarketProxy contract columns: - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_id + description: "ID of the market" data_type: numeric - - name: id - data_type: character varying tests: - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true + - name: id + description: "ID of the event record" + tests: - unique + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: current_position_size + description: "Current position size" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["PositionLiquidated"] - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: amount_liquidated + description: "Amount liquidated" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: perp_account_liquidation_attempt_base_sepolia - description: AccountLiquidationAttemp events from the PerpsMarketProxy contract + description: AccountLiquidationAttempt events from the PerpsMarketProxy contract columns: - name: id - data_type: character varying + description: "ID of the event record" tests: - - not_null - unique + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: reward + description: "Reward" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["AccountLiquidationAttempt"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: full_liquidation + description: "Whether it is a full or partial liquidation" data_type: boolean + tests: + - not_null - name: perp_collateral_modified_base_sepolia description: CollateralModified events from the PerpsMarketProxy contract columns: - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["CollateralModified"] - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: amount_delta data_type: numeric - name: synth_market_id + description: "ID of the synth market" data_type: numeric - - name: id - data_type: character varying tests: - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true + - name: id + description: "ID of the event record" + tests: - unique + - not_null - name: sender + description: "Sender address" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: perp_previous_order_expired_base_sepolia description: PreviousOrderExpired events from the PerpsMarketProxy contract columns: - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: tracking_code + description: "Tracking code" data_type: text - name: id - data_type: character varying + description: "ID of the event record" tests: - - not_null - unique + - not_null - name: size_delta data_type: numeric - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["PreviousOrderExpired"] - name: commitment_time data_type: numeric - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: acceptable_price data_type: numeric - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: perp_market_created_base_sepolia + description: MarketCreated events from the PerpsMarketProxy contract columns: - name: market_name + description: "Market name" data_type: text + tests: + - not_null - name: id - data_type: character varying + description: "ID of the event record" + tests: + - unique + - not_null - name: market_symbol + description: "Market symbol" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["MarketCreated"] - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: perps_market_id + description: "ID of the perps market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: perp_interest_charged_base_sepolia + description: InterestCharged events from the PerpsMarketProxy contract columns: - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["InterestCharged"] - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id - data_type: character varying + description: "ID of the event record" + tests: + - unique + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: interest data_type: numeric - name: account_id + description: "ID of the account" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: perp_interest_rate_updated_base_sepolia + description: InterestRateUpdated events from the PerpsMarketProxy contract columns: - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["InterestRateUpdated"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: interest_rate + description: "Interest rate" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: id - data_type: character varying + description: "ID of the event record" + tests: + - unique + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: super_market_id + description: "ID of the super market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true diff --git a/transformers/synthetix/models/raw/base/sepolia/schema.yml b/transformers/synthetix/models/raw/base/sepolia/schema.yml index 9582d4fe..3e032ac7 100644 --- a/transformers/synthetix/models/raw/base/sepolia/schema.yml +++ b/transformers/synthetix/models/raw/base/sepolia/schema.yml @@ -2,13 +2,18 @@ version: 2 models: - name: blocks_base_sepolia description: Block numbers and timestamps + tests: + - dbt_utils.recency: + datepart: hour + field: ts + interval: 1 columns: - name: ts description: UTC timestamp data_type: timestamp with time zone - name: block_number - data_type: integer description: Block height + data_type: integer tests: - not_null - unique diff --git a/transformers/synthetix/models/raw/base/sepolia/spot/schema.yml b/transformers/synthetix/models/raw/base/sepolia/spot/schema.yml index 2b37bc70..1f5d9113 100644 --- a/transformers/synthetix/models/raw/base/sepolia/spot/schema.yml +++ b/transformers/synthetix/models/raw/base/sepolia/spot/schema.yml @@ -4,223 +4,522 @@ models: description: OrderCommitted events from the SpotMarketProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderCommitted"] - name: sender + description: "Address of the delegator" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: amount_provided + description: "Amount provided" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: async_order_id + description: "Async order ID" data_type: numeric - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: order_type + description: "Type of order" data_type: integer + tests: + - not_null - name: spot_order_settled_base_sepolia description: OrderSettled events from the SpotMarketProxy contract columns: - name: final_order_amount + description: "Final order amount" data_type: numeric + tests: + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: settler + description: "Address of the settler" data_type: text + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: async_order_id + description: "Async order ID" data_type: numeric - name: order_type + description: "Type of order" data_type: integer + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: price + description: "Synth price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: collected_fees + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fees + description: "Fees data" data_type: jsonb - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderSettled"] - name: spot_order_cancelled_base_sepolia description: OrderCancelled events from the SpotMarketProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: async_order_claim + description: "Async order clain" data_type: jsonb - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: sender + description: "Address of the delegator" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["OrderCancelled"] - name: async_order_id + description: "Async order ID" data_type: numeric - name: market_id + description: "ID of the market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: spot_synth_registered_base_sepolia description: SynthRegistered events from the SpotMarketProxy contract columns: - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: synth_token_address + description: "Address of the synth token" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthRegistered"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: spot_synth_bought_base_sepolia description: SynthBought events from the SpotMarketProxy contract columns: - name: collected_fees + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: price + description: "Synth price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: fees + description: "Fees data" data_type: jsonb - name: synth_returned data_type: numeric - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthBought"] - name: spot_synth_sold_base_sepolia description: SynthSold events from the SpotMarketProxy contract columns: - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthSold"] - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: collected_fees + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: referrer + description: "Address of the referrer" data_type: text + tests: + - not_null - name: fees + description: "Fees data" data_type: jsonb - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: price + description: "Synth price" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: amount_returned + description: "Amount returned" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: spot_synth_wrapped_base_sepolia description: SynthWrapped events from the SpotMarketProxy contract columns: - name: fees + description: "Fees data" data_type: jsonb - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthWrapped"] - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: amount_wrapped data_type: numeric - name: fees_collected + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: spot_synth_unwrapped_base_sepolia description: SynthUnwrapped events from the SpotMarketProxy contract columns: - name: block_timestamp + description: "Block timestamp" data_type: timestamp with time zone + tests: + - not_null - name: amount_unwrapped + description: "Amount of synth unwrapped" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: fees_collected + description: "Amount of fees collected" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true - name: event_name + description: "Event name" data_type: text + tests: + - not_null + - accepted_values: + values: ["SynthUnwrapped"] - name: fees + description: "Fees data" data_type: jsonb - name: block_number + description: "Block number" data_type: integer + tests: + - not_null - name: transaction_hash + description: "Transaction hash" data_type: text + tests: + - not_null - name: contract + description: "Address of the contract" data_type: text + tests: + - not_null - name: id + description: "ID of the event record" data_type: character varying tests: - not_null - unique - name: synth_market_id + description: "ID of the synth market" data_type: numeric + tests: + - not_null + - dbt_utils.accepted_range: + min_value: 0 + inclusive: true