mirror of
https://github.com/FlipsideCrypto/optimism-models.git
synced 2026-02-06 11:01:44 +00:00
parent
48c9a6c588
commit
4377df77e0
@ -20,7 +20,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template_alter_all_gha_tasks.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template_alter_all_gha_tasks.yml@main
|
||||
with:
|
||||
task_action: ${{ inputs.task_action }}
|
||||
target: prod
|
||||
|
||||
2
.github/workflows/dbt_alter_gha_tasks.yml
vendored
2
.github/workflows/dbt_alter_gha_tasks.yml
vendored
@ -24,7 +24,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template_alter_gha_tasks.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template_alter_gha_tasks.yml@main
|
||||
with:
|
||||
workflow_name: ${{ inputs.workflow_name }}
|
||||
task_action: ${{ inputs.task_action }}
|
||||
|
||||
@ -11,7 +11,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@main
|
||||
with:
|
||||
command_name: Deploy New Github Actions
|
||||
command: |
|
||||
|
||||
2
.github/workflows/dbt_docs_update.yml
vendored
2
.github/workflows/dbt_docs_update.yml
vendored
@ -10,5 +10,5 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template_docs_update.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template_docs_update.yml@main
|
||||
secrets: inherit
|
||||
2
.github/workflows/dbt_integration_test.yml
vendored
2
.github/workflows/dbt_integration_test.yml
vendored
@ -14,7 +14,7 @@ concurrency: ${{ github.workflow }}
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template_integration_test.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template_integration_test.yml@main
|
||||
with:
|
||||
target: ${{ inputs.environment }}
|
||||
command: |
|
||||
|
||||
2
.github/workflows/dbt_run_adhoc.yml
vendored
2
.github/workflows/dbt_run_adhoc.yml
vendored
@ -34,7 +34,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@main
|
||||
with:
|
||||
warehouse: ${{ inputs.warehouse }}
|
||||
target: ${{ inputs.target }}
|
||||
|
||||
2
.github/workflows/dbt_run_dev_refresh.yml
vendored
2
.github/workflows/dbt_run_dev_refresh.yml
vendored
@ -11,5 +11,5 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template_dev_refresh.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template_dev_refresh.yml@main
|
||||
secrets: inherit
|
||||
@ -11,7 +11,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@main
|
||||
with:
|
||||
warehouse: DBT_EMERGENCY
|
||||
command_name: Run Observability Models
|
||||
|
||||
2
.github/workflows/dbt_run_heal_models.yml
vendored
2
.github/workflows/dbt_run_heal_models.yml
vendored
@ -11,7 +11,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@main
|
||||
with:
|
||||
command_name: Run Heal Models
|
||||
command: |
|
||||
|
||||
2
.github/workflows/dbt_run_scheduled_abis.yml
vendored
2
.github/workflows/dbt_run_scheduled_abis.yml
vendored
@ -11,7 +11,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@main
|
||||
with:
|
||||
command_name: Run ABI Models
|
||||
command: |
|
||||
|
||||
@ -11,7 +11,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@main
|
||||
with:
|
||||
command_name: Run Curated Models
|
||||
command: |
|
||||
|
||||
@ -11,7 +11,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@main
|
||||
with:
|
||||
command_name: Run Decoder Models
|
||||
command: |
|
||||
|
||||
2
.github/workflows/dbt_run_scheduled_main.yml
vendored
2
.github/workflows/dbt_run_scheduled_main.yml
vendored
@ -11,7 +11,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@main
|
||||
with:
|
||||
command_name: Run Main Models
|
||||
command: |
|
||||
|
||||
@ -12,7 +12,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@main
|
||||
with:
|
||||
command_name: Run Scores Models
|
||||
command: |
|
||||
|
||||
@ -11,7 +11,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@main
|
||||
with:
|
||||
command_name: Run Chainhead Models
|
||||
command: |
|
||||
|
||||
@ -11,7 +11,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@main
|
||||
with:
|
||||
command_name: Run Decoder Complete
|
||||
command: |
|
||||
|
||||
@ -11,7 +11,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@main
|
||||
with:
|
||||
command_name: Run History Models
|
||||
command: |
|
||||
|
||||
2
.github/workflows/dbt_test_daily.yml
vendored
2
.github/workflows/dbt_test_daily.yml
vendored
@ -11,7 +11,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@main
|
||||
with:
|
||||
target: test
|
||||
command_name: Build Daily Testing Views
|
||||
|
||||
2
.github/workflows/dbt_test_intraday.yml
vendored
2
.github/workflows/dbt_test_intraday.yml
vendored
@ -11,7 +11,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@main
|
||||
with:
|
||||
target: test
|
||||
command_name: Run Observability & Recent Tests
|
||||
|
||||
2
.github/workflows/dbt_test_monthly.yml
vendored
2
.github/workflows/dbt_test_monthly.yml
vendored
@ -11,7 +11,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@pre-release/v4-beta
|
||||
uses: FlipsideCrypto/fsc-evm/.github/workflows/dbt_run_template.yml@main
|
||||
with:
|
||||
warehouse: DBT_EMERGENCY
|
||||
command_name: Build Full Testing Views
|
||||
|
||||
@ -27,7 +27,7 @@ SELECT
|
||||
amount_in,
|
||||
ROUND(
|
||||
CASE
|
||||
WHEN token_in <> '0x4200000000000000000000000000000000000006'
|
||||
WHEN token_in <> '0x4200000000000000000000000000000000000006' or not token_in_is_verified
|
||||
AND (
|
||||
amount_out_usd IS NULL
|
||||
OR ABS((amount_in_usd - amount_out_usd) / NULLIF(amount_out_usd, 0)) > 0.75
|
||||
@ -41,7 +41,7 @@ SELECT
|
||||
amount_out,
|
||||
ROUND(
|
||||
CASE
|
||||
WHEN token_out <> '0x4200000000000000000000000000000000000006'
|
||||
WHEN token_out <> '0x4200000000000000000000000000000000000006' or not token_out_is_verified
|
||||
AND (
|
||||
amount_in_usd IS NULL
|
||||
OR ABS((amount_out_usd - amount_in_usd) / NULLIF(amount_in_usd, 0)) > 0.75
|
||||
@ -55,10 +55,16 @@ SELECT
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
protocol,
|
||||
version as protocol_version,
|
||||
token_in,
|
||||
token_in_is_verified,
|
||||
token_out,
|
||||
token_out_is_verified,
|
||||
symbol_in,
|
||||
symbol_out,
|
||||
decimals_in,
|
||||
decimals_out,
|
||||
COALESCE (
|
||||
complete_dex_swaps_id,
|
||||
{{ dbt_utils.generate_surrogate_key(
|
||||
|
||||
@ -39,6 +39,7 @@ WITH univ3 AS (
|
||||
recipient AS tx_to,
|
||||
event_index,
|
||||
'uniswap-v3' AS platform,
|
||||
'uniswap' as protocol,
|
||||
'v3' AS version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -73,6 +74,7 @@ univ2 AS (
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
'uniswap' as protocol,
|
||||
'v2' AS version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -107,6 +109,7 @@ hashflow AS (
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
'hashflow' as protocol,
|
||||
'v1' AS version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -141,6 +144,7 @@ hashflow_v3 AS (
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
'hashflow' as protocol,
|
||||
'v3' AS version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -175,6 +179,7 @@ velodrome AS (
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
'velodrome' as protocol,
|
||||
'v1' AS version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -209,6 +214,7 @@ sushi AS (
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
'sushiswap' as protocol,
|
||||
'v1' AS version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -243,6 +249,7 @@ synthetix AS (
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
'synthetix' as protocol,
|
||||
'v1' AS version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -277,6 +284,7 @@ curve AS (
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
'curve' as protocol,
|
||||
'v1' AS version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -314,6 +322,7 @@ beethovenx AS (
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
'beethovenx' as protocol,
|
||||
'v1' AS version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -348,6 +357,7 @@ kyberswap_v1_static AS (
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
'kyberswap' as protocol,
|
||||
'v1-static' AS version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -382,6 +392,7 @@ kyberswap_v2_elastic AS (
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
'kyberswap' as protocol,
|
||||
'v2' AS version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -416,6 +427,7 @@ fraxswap AS (
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
'fraxswap' as protocol,
|
||||
'v1' AS version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -449,7 +461,8 @@ velodrome_v2 AS (
|
||||
sender,
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
platform,
|
||||
'velodrome' as protocol,
|
||||
'v2' AS version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -484,6 +497,7 @@ woofi AS (
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
'woofi' as protocol,
|
||||
'v1' AS version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -518,6 +532,7 @@ dodo_v2 AS (
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
'dodo' as protocol,
|
||||
'v2' AS version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -622,6 +637,7 @@ complete_dex_swaps AS (
|
||||
s.contract_address,
|
||||
event_name,
|
||||
token_in,
|
||||
p1.is_verified as token_in_is_verified,
|
||||
c1.token_decimals AS decimals_in,
|
||||
c1.token_symbol AS symbol_in,
|
||||
amount_in_unadj,
|
||||
@ -634,6 +650,7 @@ complete_dex_swaps AS (
|
||||
ELSE NULL
|
||||
END AS amount_in_usd,
|
||||
token_out,
|
||||
p2.is_verified as token_out_is_verified,
|
||||
c2.token_decimals AS decimals_out,
|
||||
c2.token_symbol AS symbol_out,
|
||||
amount_out_unadj,
|
||||
@ -675,6 +692,7 @@ complete_dex_swaps AS (
|
||||
tx_to,
|
||||
event_index,
|
||||
s.platform,
|
||||
s.protocol,
|
||||
s.version,
|
||||
s._log_id,
|
||||
s._inserted_timestamp
|
||||
@ -719,6 +737,7 @@ heal_model AS (
|
||||
t0.contract_address,
|
||||
event_name,
|
||||
token_in,
|
||||
p1.is_verified as token_in_is_verified,
|
||||
c1.token_decimals AS decimals_in,
|
||||
c1.token_symbol AS symbol_in,
|
||||
amount_in_unadj,
|
||||
@ -731,6 +750,7 @@ heal_model AS (
|
||||
ELSE NULL
|
||||
END AS amount_in_usd_heal,
|
||||
token_out,
|
||||
p2.is_verified as token_out_is_verified,
|
||||
c2.token_decimals AS decimals_out,
|
||||
c2.token_symbol AS symbol_out,
|
||||
amount_out_unadj,
|
||||
@ -772,6 +792,7 @@ heal_model AS (
|
||||
tx_to,
|
||||
event_index,
|
||||
t0.platform,
|
||||
t0.protocol,
|
||||
t0.version,
|
||||
t0._log_id,
|
||||
t0._inserted_timestamp
|
||||
@ -997,12 +1018,14 @@ SELECT
|
||||
contract_address,
|
||||
event_name,
|
||||
token_in,
|
||||
token_in_is_verified,
|
||||
decimals_in,
|
||||
symbol_in,
|
||||
amount_in_unadj,
|
||||
amount_in_heal AS amount_in,
|
||||
amount_in_usd_heal AS amount_in_usd,
|
||||
token_out,
|
||||
token_out_is_verified,
|
||||
decimals_out,
|
||||
symbol_out,
|
||||
amount_out_unadj,
|
||||
@ -1013,6 +1036,7 @@ SELECT
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
protocol,
|
||||
version,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
@ -1040,9 +1064,12 @@ SELECT
|
||||
tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
protocol,
|
||||
version,
|
||||
token_in,
|
||||
token_in_is_verified,
|
||||
token_out,
|
||||
token_out_is_verified,
|
||||
symbol_in,
|
||||
symbol_out,
|
||||
decimals_in,
|
||||
|
||||
@ -71,10 +71,4 @@ sources:
|
||||
schema: admin
|
||||
tables:
|
||||
- name: _master_keys
|
||||
- name: rpc_node_logs
|
||||
- name: logs_temp
|
||||
database: "{{ target.database }}"
|
||||
schema: silver
|
||||
tables:
|
||||
- name: logs
|
||||
- name: decoded_logs
|
||||
- name: rpc_node_logs
|
||||
@ -1,3 +1,3 @@
|
||||
packages:
|
||||
- git: https://github.com/FlipsideCrypto/fsc-evm.git
|
||||
revision: v4.0.0-beta.104
|
||||
revision: v4.3.0
|
||||
Loading…
Reference in New Issue
Block a user