|
|
|
@ -27,17 +27,21 @@ defmodule BlockScoutWeb.AddressReadContractController do |
|
|
|
|
|
|
|
|
|
with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), |
|
|
|
|
{:ok, address} <- Chain.find_contract_address(address_hash, address_options, true) do |
|
|
|
|
{transaction_count, validation_count} = transaction_and_validation_count(address_hash) |
|
|
|
|
if address.smart_contract do |
|
|
|
|
{transaction_count, validation_count} = transaction_and_validation_count(address_hash) |
|
|
|
|
|
|
|
|
|
render( |
|
|
|
|
conn, |
|
|
|
|
"index.html", |
|
|
|
|
address: address, |
|
|
|
|
coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), |
|
|
|
|
exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), |
|
|
|
|
transaction_count: transaction_count, |
|
|
|
|
validation_count: validation_count |
|
|
|
|
) |
|
|
|
|
render( |
|
|
|
|
conn, |
|
|
|
|
"index.html", |
|
|
|
|
address: address, |
|
|
|
|
coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), |
|
|
|
|
exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), |
|
|
|
|
transaction_count: transaction_count, |
|
|
|
|
validation_count: validation_count |
|
|
|
|
) |
|
|
|
|
else |
|
|
|
|
not_found(conn) |
|
|
|
|
end |
|
|
|
|
else |
|
|
|
|
:error -> |
|
|
|
|
not_found(conn) |
|
|
|
|