|
|
|
@ -1513,7 +1513,9 @@ defmodule Explorer.Chain do |
|
|
|
|
timestamp: fragment("NULL::timestamp without time zone"), |
|
|
|
|
verified: not is_nil(smart_contract), |
|
|
|
|
exchange_rate: nil, |
|
|
|
|
total_supply: nil |
|
|
|
|
total_supply: nil, |
|
|
|
|
circulating_market_cap: nil, |
|
|
|
|
priority: 1 |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
end |
|
|
|
@ -1538,7 +1540,9 @@ defmodule Explorer.Chain do |
|
|
|
|
timestamp: fragment("NULL::timestamp without time zone"), |
|
|
|
|
verified: not is_nil(smart_contract), |
|
|
|
|
exchange_rate: token.fiat_value, |
|
|
|
|
total_supply: token.total_supply |
|
|
|
|
total_supply: token.total_supply, |
|
|
|
|
circulating_market_cap: token.circulating_market_cap, |
|
|
|
|
priority: 0 |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
end |
|
|
|
@ -1563,7 +1567,9 @@ defmodule Explorer.Chain do |
|
|
|
|
timestamp: fragment("NULL::timestamp without time zone"), |
|
|
|
|
verified: true, |
|
|
|
|
exchange_rate: nil, |
|
|
|
|
total_supply: nil |
|
|
|
|
total_supply: nil, |
|
|
|
|
circulating_market_cap: nil, |
|
|
|
|
priority: 0 |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
end |
|
|
|
@ -1597,7 +1603,9 @@ defmodule Explorer.Chain do |
|
|
|
|
timestamp: fragment("NULL::timestamp without time zone"), |
|
|
|
|
verified: address.verified, |
|
|
|
|
exchange_rate: nil, |
|
|
|
|
total_supply: nil |
|
|
|
|
total_supply: nil, |
|
|
|
|
circulating_market_cap: nil, |
|
|
|
|
priority: 0 |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
|
|
|
|
@ -1628,7 +1636,9 @@ defmodule Explorer.Chain do |
|
|
|
|
timestamp: block.timestamp, |
|
|
|
|
verified: nil, |
|
|
|
|
exchange_rate: nil, |
|
|
|
|
total_supply: nil |
|
|
|
|
total_supply: nil, |
|
|
|
|
circulating_market_cap: nil, |
|
|
|
|
priority: 0 |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
|
|
|
|
@ -1657,7 +1667,9 @@ defmodule Explorer.Chain do |
|
|
|
|
timestamp: block.timestamp, |
|
|
|
|
verified: nil, |
|
|
|
|
exchange_rate: nil, |
|
|
|
|
total_supply: nil |
|
|
|
|
total_supply: nil, |
|
|
|
|
circulating_market_cap: nil, |
|
|
|
|
priority: 0 |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
|
|
|
|
@ -1681,7 +1693,9 @@ defmodule Explorer.Chain do |
|
|
|
|
timestamp: block.timestamp, |
|
|
|
|
verified: nil, |
|
|
|
|
exchange_rate: nil, |
|
|
|
|
total_supply: nil |
|
|
|
|
total_supply: nil, |
|
|
|
|
circulating_market_cap: nil, |
|
|
|
|
priority: 0 |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
|
|
|
|
@ -1731,7 +1745,14 @@ defmodule Explorer.Chain do |
|
|
|
|
|
|
|
|
|
ordered_query = |
|
|
|
|
from(items in subquery(query), |
|
|
|
|
order_by: [desc_nulls_last: items.holder_count, asc: items.name, desc: items.inserted_at], |
|
|
|
|
order_by: [ |
|
|
|
|
desc: items.priority, |
|
|
|
|
desc_nulls_last: items.circulating_market_cap, |
|
|
|
|
desc_nulls_last: items.exchange_rate, |
|
|
|
|
desc_nulls_last: items.holder_count, |
|
|
|
|
asc: items.name, |
|
|
|
|
desc: items.inserted_at |
|
|
|
|
], |
|
|
|
|
limit: ^paging_options.page_size, |
|
|
|
|
offset: ^offset |
|
|
|
|
) |
|
|
|
|