Skip to content

Commit

Permalink
Resolve bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
horaceliuHL committed Dec 20, 2024
1 parent a3aeca8 commit fd4950d
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion models/dimensions/contracts/dim_flipside_contracts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ select
coalesce(max_by(name, category), max(name)) as name,
coalesce(max_by(namespace, category), max(namespace)) as namespace,
max(sub_category) as sub_category,
max(category) as category
max(category) as category,
max(last_updated) as last_updated
from flipside_contract
group by address, chain
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
with
deployed_contracts as (
select tx_signer as address,
ft.modified_timestamp
max(ft.modified_timestamp) as modified_timestamp
from near_flipside.core.fact_actions_events fae
join
near_flipside.core.fact_transactions ft
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion models/dimensions/token_types/arb_token_type.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ with
coalesce(l.address_name, c.name, null) name,
coalesce(l.project_name, c.symbol, null) namespace,
coalesce(a.token_standard, null) category,
modified_timestamp
coalesce(a.modified_timestamp, l.modified_timestamp, c.modified_timestamp, null) modified_timestamp
from contract_standard a
left join
arbitrum_flipside.core.dim_contracts c
Expand Down
2 changes: 1 addition & 1 deletion models/dimensions/token_types/avax_token_type.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ with
coalesce(l.address_name, c.name, null) name,
coalesce(l.project_name, c.symbol, null) namespace,
coalesce(a.token_standard, null) category,
modified_timestamp
coalesce(a.modified_timestamp, l.modified_timestamp, c.modified_timestamp, null) modified_timestamp
from contract_standard a
left join
avalanche_flipside.core.dim_contracts c
Expand Down
2 changes: 1 addition & 1 deletion models/dimensions/token_types/base_token_type.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ with
coalesce(l.address_name, c.name, null) name,
coalesce(l.project_name, c.symbol, null) namespace,
coalesce(a.token_standard, null) category,
modified_timestamp
coalesce(a.modified_timestamp, l.modified_timestamp, c.modified_timestamp, null) modified_timestamp
from contract_standard a
left join
base_flipside.core.dim_contracts c on lower(a.address) = lower(c.address)
Expand Down
2 changes: 1 addition & 1 deletion models/dimensions/token_types/bsc_token_type.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ with
coalesce(l.address_name, c.name, null) name,
coalesce(l.project_name, c.symbol, null) namespace,
coalesce(a.token_standard, null) category,
modified_timestamp
coalesce(a.modified_timestamp, l.modified_timestamp, c.modified_timestamp, null) modified_timestamp
from contract_standard a
left join
bsc_flipside.core.dim_contracts c on lower(a.address) = lower(c.address)
Expand Down
2 changes: 1 addition & 1 deletion models/dimensions/token_types/eth_token_type.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ with
coalesce(l.address_name, c.name, null) name,
coalesce(l.label, c.symbol, null) namespace,
coalesce(a.token_standard, null) category,
modified_timestamp
coalesce(a.modified_timestamp, l.modified_timestamp, c.modified_timestamp, null) modified_timestamp
from contract_standard a
left join
ethereum_flipside.core.dim_contracts c
Expand Down
2 changes: 1 addition & 1 deletion models/dimensions/token_types/opt_token_type.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ with
coalesce(l.address_name, c.name, null) name,
coalesce(l.project_name, c.symbol, null) namespace,
coalesce(a.token_standard, null) category,
modified_timestamp
coalesce(a.modified_timestamp, l.modified_timestamp, c.modified_timestamp, null) modified_timestamp
from contract_standard a
left join
optimism_flipside.core.dim_contracts c
Expand Down
2 changes: 1 addition & 1 deletion models/dimensions/token_types/polygon_token_type.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ with
coalesce(l.address_name, c.name, null) name,
coalesce(l.project_name, c.symbol, null) namespace,
coalesce(a.token_standard, null) category,
modified_timestamp
coalesce(a.modified_timestamp, l.modified_timestamp, c.modified_timestamp, null) modified_timestamp
from contract_standard a
left join
polygon_flipside.core.dim_contracts c on lower(a.address) = lower(c.address)
Expand Down
2 changes: 1 addition & 1 deletion models/staging/sui/dim_sui_contracts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sui_contracts_sigma_over as (
max(category) as category,
max(sub_category) as sub_category,
'sui' as chain,
timestamp as last_updated
max(timestamp) as last_updated
from {{ ref("fact_sui_contracts_silver") }} as sui_contracts full join {{ source("SIGMA", "sui_overwrite_namespace") }} overwrite
on sui_contracts.namespace = overwrite.sui_namespace
group by package_id
Expand Down

0 comments on commit fd4950d

Please sign in to comment.