After Width: | Height: | Size: 806 B |
@ -1,14 +1,17 @@ |
||||
body:after { |
||||
position:absolute; width:0; height:0; overflow:hidden; z-index:-1; |
||||
content: |
||||
url(/images/network-selector-icons/callisto-mainnet.png) |
||||
url(/images/network-selector-icons/ethereum-classic.png) |
||||
url(/images/network-selector-icons/goerli-testnet.png) |
||||
url(/images/network-selector-icons/kovan-testnet.png) |
||||
url(/images/network-selector-icons/poa-core.png) |
||||
url(/images/network-selector-icons/poa-sokol.png) |
||||
url(/images/network-selector-icons/rinkeby-testnet.png) |
||||
url(/images/network-selector-icons/rsk-mainnet.png) |
||||
url(/images/network-selector-icons/ropsten-testnet.png) |
||||
url(/images/network-selector-icons/xdai-chain.png) |
||||
url(/images/network-selector-icons/callisto-mainnet.svg) |
||||
url(/images/network-selector-icons/ethereum-mainnet.svg) |
||||
url(/images/network-selector-icons/ethereum-classic.svg) |
||||
url(/images/network-selector-icons/goerli-testnet.svg) |
||||
url(/images/network-selector-icons/kovan-testnet.svg) |
||||
url(/images/network-selector-icons/poa-core.svg) |
||||
url(/images/network-selector-icons/poa-sokol.svg) |
||||
url(/images/network-selector-icons/rinkeby-testnet.svg) |
||||
url(/images/network-selector-icons/rsk-mainnet.svg) |
||||
url(/images/network-selector-icons/ropsten-testnet.svg) |
||||
url(/images/network-selector-icons/xdai-chain.svg) |
||||
url(/images/network-selector-icons/lukso-l14-testnet.svg) |
||||
url(/images/network-selector-icons/circle-xusdt.svg) |
||||
}; |
@ -0,0 +1,86 @@ |
||||
/* Custom Tooltips for Block Details Page */ |
||||
|
||||
.tooltipCustom { |
||||
position: relative; |
||||
display: inline-block; |
||||
} |
||||
|
||||
.tooltipCustom .tooltiptextTopMiner { |
||||
visibility: hidden; |
||||
position: absolute; |
||||
width: 50%; |
||||
background-color: white; |
||||
color: black; |
||||
text-align: center; |
||||
border-radius: 6px; |
||||
left: 25%; |
||||
bottom: 100%; |
||||
padding: 15px 0px; |
||||
display: inline-block; |
||||
z-index: 1; |
||||
font-family: Nunito; |
||||
margin-bottom: 15px; |
||||
opacity: 0; |
||||
transition: opacity 0.5s; |
||||
@include media-breakpoint-down(lg) { |
||||
left: 60%; |
||||
} |
||||
} |
||||
|
||||
.tooltipCustom .tooltiptextTopMiner::after { |
||||
content: ''; |
||||
position: absolute; |
||||
top: 100%; |
||||
left: 50%; |
||||
margin-left: -5px; |
||||
border-width: 5px; |
||||
border-style: solid; |
||||
border-color: white transparent transparent transparent; |
||||
} |
||||
|
||||
.tooltipCustom:hover .tooltiptextTopMiner { |
||||
visibility: visible; |
||||
opacity: 1; |
||||
} |
||||
|
||||
.tooltipCustom .tooltiptextTopR { |
||||
visibility: hidden; |
||||
position: absolute; |
||||
width: 50%; |
||||
background-color: $primary; |
||||
color: white; |
||||
text-align: center; |
||||
border-radius: 6px; |
||||
left: 52%; |
||||
bottom: 120%; |
||||
padding: 15px 10px; |
||||
font-family: Nunito; |
||||
display: inline-block; |
||||
z-index: 1; |
||||
margin-bottom: 15px; |
||||
opacity: 0; |
||||
transition: opacity 0.5s; |
||||
@include media-breakpoint-down(lg) { |
||||
bottom: 100%; |
||||
padding: 9px 10px; |
||||
} |
||||
} |
||||
|
||||
.tooltipCustom .tooltiptextTopR::after { |
||||
content: ''; |
||||
position: absolute; |
||||
top: 100%; |
||||
left: 50%; |
||||
margin-left: -5px; |
||||
border-width: 5px; |
||||
border-style: solid; |
||||
border-color: $primary transparent transparent transparent; |
||||
} |
||||
|
||||
.tooltipCustom:hover .tooltiptextTopR { |
||||
visibility: visible; |
||||
opacity: 1; |
||||
} |
||||
|
||||
|
||||
/* Custom Tooltips for Block Details Page end*/ |
@ -1 +1,7 @@ |
||||
// general |
||||
$primary: #17314f; |
||||
$secondary: #15bba6; |
||||
$tertiary: #93d7ff; |
||||
$additional-font: #fff; |
||||
|
||||
$btn-line-color: $secondary; // button border and font color && hover bg color |
@ -1 +1,7 @@ |
||||
// general |
||||
$primary: #840032; |
||||
$secondary: #343434; |
||||
$tertiary: #7f7f7f; |
||||
$additional-font: #ff95db; |
||||
|
||||
$btn-line-color: #4b021e; // button border and font color && hover bg color |
@ -1 +1,7 @@ |
||||
// general |
||||
$primary: #1c1c3d; |
||||
$secondary: #4ad7a7; |
||||
$tertiary: #5959d8; |
||||
$additional-font: #bdbdff; |
||||
|
||||
$btn-line-color: $tertiary; // button border and font color && hover bg color |
@ -1 +1,7 @@ |
||||
// general |
||||
$primary: #153550; |
||||
$secondary: #49a2ee; |
||||
$tertiary: #4ad7a7; |
||||
$additional-font: #89cae6; |
||||
|
||||
$btn-line-color: $secondary; // button border and font color && hover bg color |
@ -1 +1,8 @@ |
||||
// general |
||||
$primary: #2b2b2b; |
||||
$secondary: #eac247; |
||||
$tertiary: #929292; |
||||
$additional-font: #ffffff; |
||||
$sub-accent-color: #a46f30; |
||||
|
||||
$btn-line-color: $sub-accent-color; // button border and font color && hover bg color |
@ -1 +1,7 @@ |
||||
// general |
||||
$primary: #101f25; |
||||
$secondary: #35e3d8; |
||||
$tertiary: #1f857f; |
||||
$additional-font: #99fff9; |
||||
|
||||
$btn-line-color: $tertiary; // button border and font color && hover bg color |
@ -1 +1,7 @@ |
||||
// general |
||||
$primary: #1d3154; |
||||
$secondary: #fdcec4; |
||||
$tertiary: #a96c55; |
||||
$additional-font: #a1ded1; |
||||
|
||||
$btn-line-color: $primary; // button border and font color && hover bg color |
@ -1 +1,7 @@ |
||||
// general |
||||
$primary: #5c34a2; |
||||
$secondary: #87e1a9; |
||||
$tertiary: #bf9cff; |
||||
$additional-font: #fff; |
||||
|
||||
$btn-line-color: $primary; // button border and font color && hover bg color |
@ -1 +1,7 @@ |
||||
// general |
||||
$primary: #5c34a2; |
||||
$secondary: #87e1a9; |
||||
$tertiary: #bf9cff; |
||||
$additional-font: #fff; |
||||
|
||||
$btn-line-color: $primary; // button border and font color && hover bg color |
@ -1 +1,7 @@ |
||||
// general |
||||
$primary: #153550; |
||||
$secondary: #38a9f5; |
||||
$tertiary: #76f1ff; |
||||
$additional-font: #89cae6; |
||||
|
||||
$btn-line-color: $secondary; // button border and font color && hover bg color |
@ -1 +1,7 @@ |
||||
// general |
||||
$primary: #153550; |
||||
$secondary: #38a9f5; |
||||
$tertiary: #76f1ff; |
||||
$additional-font: #89cae6; |
||||
|
||||
$btn-line-color: $secondary; // button border and font color && hover bg color |
@ -1 +1,7 @@ |
||||
// general |
||||
$primary: #101f25; |
||||
$secondary: #27ac8d; |
||||
$tertiary: #e39a54; |
||||
$additional-font: #a1ded1; |
||||
|
||||
$btn-line-color: $secondary; // button border and font color && hover bg color |
@ -1 +1,8 @@ |
||||
// general |
||||
$primary: #093731; |
||||
$secondary: #40bfb2; |
||||
$tertiary: #25c9ff; |
||||
$additional-font: #93e8dd; |
||||
$sub-accent-color: #1c9f90; |
||||
|
||||
$btn-line-color: $sub-accent-color; // button border and font color && hover bg color |
@ -0,0 +1,7 @@ |
||||
// general |
||||
$primary: #2b9f7a; |
||||
$secondary: #20745a; |
||||
$tertiary: #fff; |
||||
$additional-font: #fff; |
||||
|
||||
$btn-line-color: $secondary; // button border and font color && hover bg color |
@ -0,0 +1,97 @@ |
||||
// general |
||||
$primary: #2b9f7a; |
||||
$secondary: #20745a; |
||||
$tertiary: #fff; |
||||
$additional-font: #fff; |
||||
|
||||
$tile-body-a-color: $primary; |
||||
$tile-type-block-color: $primary; |
||||
$tile-type-progress-bar-color: $primary; |
||||
a.tile-title { color: $primary !important; } |
||||
|
||||
// footer |
||||
$footer-background-color: #282d31; |
||||
$footer-title-color: #fff; |
||||
$footer-text-color: $additional-font; |
||||
$footer-item-disc-color: $secondary; |
||||
$footer-social-icon-color: $secondary; |
||||
|
||||
// dashboard |
||||
$dashboard-line-color-price: #fff; // price left border |
||||
|
||||
$dashboard-banner-chart-legend-label-color: #fff; |
||||
$dashboard-stats-item-label-color: $dashboard-banner-chart-legend-label-color; |
||||
$dashboard-banner-chart-legend-value-color: #fff; // chart labels |
||||
$dashboard-stats-item-value-color: #fff; // stat values |
||||
|
||||
$dashboard-stats-item-border-color: $secondary; // stat border |
||||
|
||||
$dashboard-banner-gradient-start: $primary; // gradient begin |
||||
|
||||
$dashboard-banner-gradient-end: #289371; // gradient end |
||||
|
||||
$dashboard-banner-network-plain-container-background-color: #2ea780; // stats bg |
||||
|
||||
|
||||
// navigation |
||||
.navbar { box-shadow: 0px 0px 30px 0px rgba(21, 53, 80, 0.12); } // header shadow |
||||
$dropdown-menu-item-hover-color: $primary !default; |
||||
$dropdown-menu-item-hover-background: rgba($primary, .1) !default; |
||||
$header-icon-color-hover: $primary; |
||||
$header-icon-border-color-hover: $primary; |
||||
|
||||
// buttons |
||||
$btn-line-bg: #fff; // button bg |
||||
$btn-line-color: $primary; // button border and font color && hover bg color |
||||
$btn-copy-color: $primary; // btn copy |
||||
$btn-qr-color: $primary; // btn qr-code |
||||
$btn-address-card-icon-color: $primary; // btn address color |
||||
|
||||
//links & tile |
||||
$tile-body-a-color: $primary; |
||||
$tile-type-block-color: $primary; |
||||
$tile-type-progress-bar-color: $primary; |
||||
a.tile-title { color: $primary !important; } |
||||
|
||||
// card |
||||
$card-background-1: $primary; |
||||
$card-tab-active: $primary; |
||||
|
||||
.layout-container { |
||||
.dashboard-banner-container { |
||||
background-image: linear-gradient( |
||||
to bottom, |
||||
$dashboard-banner-gradient-start, |
||||
$dashboard-banner-gradient-end |
||||
); |
||||
} |
||||
} |
||||
|
||||
// Badges |
||||
$badge-neutral-color: $primary; |
||||
$badge-neutral-background-color: rgba($primary, .1); |
||||
$api-text-monospace-color: $primary; |
||||
|
||||
// Tokens dropdown |
||||
.token-balance-dropdown[aria-labelledby="dropdown-tokens"] { |
||||
.dropdown-items .dropdown-item:hover { |
||||
color: $primary !important; |
||||
} |
||||
} |
||||
|
||||
// Dark theme |
||||
$dark-primary: #2b9f7a; |
||||
$dark-secondary: #20745a; |
||||
$dark-primary-alternate: #2b9f7a; |
||||
|
||||
.dark-theme-applied .dashboard-banner-chart-legend .dashboard-banner-chart-legend-item:nth-child(1)::before { |
||||
background-color: white!important; |
||||
} |
||||
|
||||
.dark-theme-applied .dashboard-banner-chart-legend .dashboard-banner-chart-legend-item:nth-child(2)::before { |
||||
background-color: $primary!important; |
||||
} |
||||
|
||||
.dark-theme-applied .tile .tile-body a, .dark-theme-applied .tile span[data-address-hash] { |
||||
color: #2b9f7a; |
||||
} |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 584 B |
Before Width: | Height: | Size: 868 B |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 425 B |
Before Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 646 B |
Before Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 674 B |
After Width: | Height: | Size: 435 B |
Before Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 800 B |
Before Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 848 B |
Before Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 916 B |
Before Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 916 B |
Before Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 587 B |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 4.7 KiB |
@ -1,7 +1,41 @@ |
||||
defmodule BlockScoutWeb.Tokens.TokenController do |
||||
use BlockScoutWeb, :controller |
||||
|
||||
require Logger |
||||
|
||||
alias Explorer.Chain |
||||
|
||||
def show(conn, %{"id" => address_hash_string}) do |
||||
redirect(conn, to: token_transfer_path(conn, :index, address_hash_string)) |
||||
end |
||||
|
||||
def fetch_token_counters(token, address_hash) do |
||||
total_token_transfers_task = |
||||
Task.async(fn -> |
||||
Chain.count_token_transfers_from_token_hash(address_hash) |
||||
end) |
||||
|
||||
total_token_holders_task = |
||||
Task.async(fn -> |
||||
token.holder_count || Chain.count_token_holders_from_token_hash(address_hash) |
||||
end) |
||||
|
||||
[total_token_transfers_task, total_token_holders_task] |
||||
|> Task.yield_many(:timer.seconds(40)) |
||||
|> Enum.map(fn {_task, res} -> |
||||
case res do |
||||
{:ok, result} -> |
||||
result |
||||
|
||||
{:exit, reason} -> |
||||
Logger.warn("Query fetching token counters terminated: #{inspect(reason)}") |
||||
0 |
||||
|
||||
nil -> |
||||
Logger.warn("Query fetching token counters timed out.") |
||||
0 |
||||
end |
||||
end) |
||||
|> List.to_tuple() |
||||
end |
||||
end |
||||
|