diff --git a/warehouse/dbt/models/intermediate/directory/int_contracts.sql b/warehouse/dbt/models/intermediate/directory/int_contracts.sql index 71b131eed..5fa83bf1a 100644 --- a/warehouse/dbt/models/intermediate/directory/int_contracts.sql +++ b/warehouse/dbt/models/intermediate/directory/int_contracts.sql @@ -89,6 +89,26 @@ factory_deployments as ( on factories.factory_address = deployers.contract_address ) -select * from contract_deployments +select + artifact_source, + root_deployer_address, + contract_address, + contract_type, + created_by_address, + creator_type, + originating_eoa_address, + transaction_hash, + block_timestamp +from contract_deployments union all -select * from factory_deployments +select + artifact_source, + root_deployer_address, + contract_address, + contract_type, + created_by_address, + creator_type, + originating_eoa_address, + transaction_hash, + block_timestamp +from factory_deployments diff --git a/warehouse/dbt/models/marts/directory/contracts_v1.sql b/warehouse/dbt/models/marts/directory/contracts_v1.sql index 7d91fa070..c22f748c2 100644 --- a/warehouse/dbt/models/marts/directory/contracts_v1.sql +++ b/warehouse/dbt/models/marts/directory/contracts_v1.sql @@ -4,14 +4,10 @@ }) }} -select +select distinct artifact_source, - transaction_hash, - block_timestamp, root_deployer_address, - created_by_address, contract_address, - originating_eoa_address, - creator_type, contract_type from {{ ref('int_contracts') }} +where root_deployer_address is not null