diff --git a/warehouse/dbt/models/marts/superchain/rf4_impact_metrics_by_project.sql b/warehouse/dbt/models/marts/superchain/rf4_impact_metrics_by_project.sql index 265fd2034..e0f29101e 100644 --- a/warehouse/dbt/models/marts/superchain/rf4_impact_metrics_by_project.sql +++ b/warehouse/dbt/models/marts/superchain/rf4_impact_metrics_by_project.sql @@ -3,8 +3,6 @@ #} with metrics as ( - select * from {{ ref('rf4_check_oss_requirements') }} - union all select * from {{ ref('rf4_gas_fees') }} union all select * from {{ ref('rf4_transactions') }} @@ -35,9 +33,6 @@ with metrics as ( pivot_metrics as ( select project_id, - MAX( - case when metric = 'check_oss_requirements' then amount else 0 end - ) as check_oss_requirements, MAX( case when metric = 'gas_fees' then amount else 0 end ) as gas_fees, @@ -82,9 +77,8 @@ pivot_metrics as ( ) select - agora_rf4_to_ossd.application_id, - agora_rf4_to_ossd.oso_project_name, - pivot_metrics.check_oss_requirements, + rf4_project_eligibility.application_id, + rf4_project_eligibility.is_oss, pivot_metrics.gas_fees, pivot_metrics.transaction_count, pivot_metrics.trusted_transaction_count, @@ -101,6 +95,6 @@ select from pivot_metrics left join {{ ref('projects_v1') }} on pivot_metrics.project_id = projects_v1.project_id -left join {{ source("static_data_sources", "agora_rf4_to_ossd") }} - on projects_v1.project_name = agora_rf4_to_ossd.oso_project_name -where agora_rf4_to_ossd.application_id is not null +left join {{ source("static_data_sources", "rf4_project_eligibility") }} + on projects_v1.project_name = rf4_project_eligibility.oso_name +where rf4_project_eligibility.is_approved is true diff --git a/warehouse/dbt/models/marts/superchain/verification/rf4_onchain_eligibility_checks.sql b/warehouse/dbt/models/marts/superchain/verification/rf4_onchain_eligibility_checks.sql index 8fc7de8b3..2be2540d3 100644 --- a/warehouse/dbt/models/marts/superchain/verification/rf4_onchain_eligibility_checks.sql +++ b/warehouse/dbt/models/marts/superchain/verification/rf4_onchain_eligibility_checks.sql @@ -2,9 +2,10 @@ with projects as ( select app.application_id, app.project_name, - ossd.oso_project_name + ossd.oso_name as oso_project_name from {{ source('static_data_sources', 'agora_rf4_applications') }} as app - left join {{ source('static_data_sources', 'agora_rf4_to_ossd') }} as ossd + left join + {{ source('static_data_sources', 'rf4_project_eligibility') }} as ossd on app.application_id = ossd.application_id ), diff --git a/warehouse/dbt/models/marts/superchain/verification/rf4_oso_contract_discovery.sql b/warehouse/dbt/models/marts/superchain/verification/rf4_oso_contract_discovery.sql index 61c1d4857..db71a987c 100644 --- a/warehouse/dbt/models/marts/superchain/verification/rf4_oso_contract_discovery.sql +++ b/warehouse/dbt/models/marts/superchain/verification/rf4_oso_contract_discovery.sql @@ -1,12 +1,12 @@ with projects as ( select apps.application_id, - apps.oso_project_name as project_name, + apps.oso_name as project_name, current_projects.blockchain - from {{ source('static_data_sources', 'agora_rf4_to_ossd') }} as apps + from {{ source('static_data_sources', 'rf4_project_eligibility') }} as apps left join {{ ref('stg_ossd__current_projects') }} as current_projects - on apps.oso_project_name = current_projects.project_name + on apps.oso_name = current_projects.project_name ), oso_blockchain_artifacts as ( diff --git a/warehouse/dbt/models/static_data_sources.yml b/warehouse/dbt/models/static_data_sources.yml index 70f0babe6..646da85f3 100644 --- a/warehouse/dbt/models/static_data_sources.yml +++ b/warehouse/dbt/models/static_data_sources.yml @@ -9,8 +9,8 @@ sources: identifier: agora_rf4_applications - name: agora_rf4_artifacts_by_app identifier: agora_rf4_artifacts_by_app - - name: agora_rf4_to_ossd - identifier: agora_rf4_to_ossd + - name: rf4_project_eligibility + identifier: rf4_project_eligibility - name: agora_rf4_repos_with_contracts identifier: agora_rf4_repos_with_contracts - name: op_airdrop1_addresses_detailed_list