@ -1,3 +1,3 @@ |
|||||||
elixir 1.9.1-otp-22 |
elixir 1.9.4 |
||||||
erlang 22.0 |
erlang 22.2 |
||||||
nodejs 10.11.0 |
nodejs 12.14.1 |
||||||
|
@ -1,5 +1,3 @@ |
|||||||
{ |
{ |
||||||
presets: [ |
"presets": [["@babel/preset-env", { "useBuiltIns": "usage" }]] |
||||||
'env' |
|
||||||
] |
|
||||||
} |
} |
||||||
|
@ -0,0 +1,7 @@ |
|||||||
|
// general |
||||||
|
$primary: #3a6ea7; |
||||||
|
$secondary: #558ac3; |
||||||
|
$tertiary: #3a6ea7; |
||||||
|
$additional-font: #bdbdff; |
||||||
|
|
||||||
|
$btn-line-color: $tertiary; // button border and font color && hover bg color |
@ -0,0 +1,84 @@ |
|||||||
|
// general |
||||||
|
$primary: #3a6ea7; |
||||||
|
$secondary: #558ac3; |
||||||
|
$tertiary: #3a6ea7; |
||||||
|
$additional-font: #bdbdff; |
||||||
|
|
||||||
|
// footer |
||||||
|
$footer-background-color: $primary; |
||||||
|
$footer-title-color: #fff; |
||||||
|
$footer-text-color: $additional-font; |
||||||
|
$footer-item-disc-color: $tertiary; |
||||||
|
$footer-social-icon-color: #3a6ea7; |
||||||
|
|
||||||
|
// dashboard |
||||||
|
$dashboard-line-color-price: $secondary; |
||||||
|
$dashboard-line-color-market: $tertiary; |
||||||
|
$dashboard-banner-gradient-start: #7ba4d1; |
||||||
|
$dashboard-banner-gradient-end: #3a6ea7; |
||||||
|
|
||||||
|
$dashboard-banner-chart-legend-label-color: $additional-font; |
||||||
|
$dashboard-stats-item-label-color: $additional-font; |
||||||
|
$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-network-plain-container-background-color: #2e5884; // stats bg |
||||||
|
|
||||||
|
// navigation |
||||||
|
$header-icon-border-color-hover: $tertiary; // top border on hover |
||||||
|
$header-icon-color-hover: $tertiary; // nav icon on hover |
||||||
|
|
||||||
|
// buttons |
||||||
|
$btn-line-bg: #fff; // button bg |
||||||
|
$btn-line-color: $tertiary; // button border and font color && hover bg color |
||||||
|
$btn-copy-color: $tertiary; // btn copy |
||||||
|
$btn-qr-color: $tertiary; // btn qr-code |
||||||
|
$btn-address-card-icon-color: $tertiary; // btn address color |
||||||
|
$btn-contract-color: $tertiary; |
||||||
|
|
||||||
|
//links & tile |
||||||
|
$tile-body-a-color: $tertiary; |
||||||
|
$tile-type-block-color: $tertiary; |
||||||
|
$tile-type-progress-bar-color: $tertiary; |
||||||
|
a.tile-title { color: $tertiary !important; } |
||||||
|
|
||||||
|
// card |
||||||
|
$card-background-1: $tertiary; |
||||||
|
$card-tab-active: $tertiary; |
||||||
|
|
||||||
|
// ETC theme's idiosyncrasies |
||||||
|
.layout-container { |
||||||
|
.navbar { |
||||||
|
box-shadow: 0 0 30px 0 rgba(21, 53, 80, 0.12); |
||||||
|
} |
||||||
|
|
||||||
|
.dropdown-item:hover, |
||||||
|
.dropdown-item.active, |
||||||
|
.dropdown-item:focus { |
||||||
|
background-color: rgba($tertiary, .1) !important; |
||||||
|
color: $tertiary !important; |
||||||
|
} |
||||||
|
|
||||||
|
.dashboard-banner-container { |
||||||
|
background-image: linear-gradient( |
||||||
|
to bottom, |
||||||
|
$dashboard-banner-gradient-start, |
||||||
|
$dashboard-banner-gradient-end |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
.footer-logo { |
||||||
|
filter: brightness(0) invert(1); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
// Badges |
||||||
|
$badge-neutral-color: $tertiary; |
||||||
|
$badge-neutral-background-color: rgba($tertiary, .1); |
||||||
|
$api-text-monospace-color: $tertiary; |
||||||
|
|
||||||
|
// Dark theme |
||||||
|
$dark-primary: #8588ff; |
||||||
|
$dark-secondary: #4ad7a7; |
||||||
|
$dark-primary-alternate: #5b5ed8; |
@ -0,0 +1,18 @@ |
|||||||
|
import $ from 'jquery' |
||||||
|
|
||||||
|
import { formatAllUsdValues, updateAllCalculatedUsdValues } from './lib/currency' |
||||||
|
import { createMarketHistoryChart } from './lib/market_history_chart' |
||||||
|
import { createCoinBalanceHistoryChart } from './lib/coin_balance_history_chart' |
||||||
|
|
||||||
|
(function () { |
||||||
|
const dashboardChartElement = $('[data-chart="marketHistoryChart"]')[0] |
||||||
|
const coinBalanceHistoryChartElement = $('[data-chart="coinBalanceHistoryChart"]')[0] |
||||||
|
if (dashboardChartElement) { |
||||||
|
window.dashboardChart = createMarketHistoryChart(dashboardChartElement) |
||||||
|
} |
||||||
|
if (coinBalanceHistoryChartElement) { |
||||||
|
window.coinBalanceHistoryChart = createCoinBalanceHistoryChart(coinBalanceHistoryChartElement) |
||||||
|
} |
||||||
|
formatAllUsdValues() |
||||||
|
updateAllCalculatedUsdValues() |
||||||
|
})() |
@ -0,0 +1,3 @@ |
|||||||
|
import './read_only_functions' |
||||||
|
import './wei_ether_converter' |
||||||
|
import '../../app' |
@ -0,0 +1,2 @@ |
|||||||
|
import '../lib/smart_contract/index' |
||||||
|
import './token_counters' |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 762 KiB |
After Width: | Height: | Size: 405 KiB |
After Width: | Height: | Size: 424 B |
After Width: | Height: | Size: 794 B |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 555 B After Width: | Height: | Size: 581 B |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 7.2 KiB |
@ -1,5 +0,0 @@ |
|||||||
use Mix.Config |
|
||||||
|
|
||||||
# Configures the endpoint |
|
||||||
config :block_scout_web, BlockScoutWeb.Endpoint, |
|
||||||
secret_key_base: "RMgI4C1HSkxsEjdhtGMfwAHfyT6CKWXOgzCboJflfSm4jeAlic52io05KB6mqzc5" |
|
@ -0,0 +1,57 @@ |
|||||||
|
defmodule BlockScoutWeb.ChecksumAddress do |
||||||
|
@moduledoc """ |
||||||
|
Adds checksummed version of address hashes. |
||||||
|
""" |
||||||
|
|
||||||
|
import Plug.Conn |
||||||
|
|
||||||
|
alias Explorer.Chain |
||||||
|
alias Explorer.Chain.Address |
||||||
|
alias Phoenix.Controller |
||||||
|
alias Plug.Conn |
||||||
|
|
||||||
|
def init(opts), do: opts |
||||||
|
|
||||||
|
def call(%Conn{params: %{"id" => id}} = conn, _opts) do |
||||||
|
check_checksum(conn, id, "id") |
||||||
|
end |
||||||
|
|
||||||
|
def call(%Conn{params: %{"address_id" => id}} = conn, _opts) do |
||||||
|
check_checksum(conn, id, "address_id") |
||||||
|
end |
||||||
|
|
||||||
|
def call(conn, _), do: conn |
||||||
|
|
||||||
|
defp check_checksum(conn, id, param_name) do |
||||||
|
if Application.get_env(:block_scout_web, :checksum_address_hashes) do |
||||||
|
case Chain.string_to_address_hash(id) do |
||||||
|
{:ok, address_hash} -> |
||||||
|
checksummed_hash = Address.checksum(address_hash) |
||||||
|
|
||||||
|
if checksummed_hash != id do |
||||||
|
conn = %{conn | params: Map.merge(conn.params, %{param_name => checksummed_hash})} |
||||||
|
|
||||||
|
path_with_checksummed_address = String.replace(conn.request_path, id, checksummed_hash) |
||||||
|
|
||||||
|
new_path = |
||||||
|
if conn.query_string != "" do |
||||||
|
path_with_checksummed_address <> "?" <> conn.query_string |
||||||
|
else |
||||||
|
path_with_checksummed_address |
||||||
|
end |
||||||
|
|
||||||
|
conn |
||||||
|
|> Controller.redirect(to: new_path) |
||||||
|
|> halt |
||||||
|
else |
||||||
|
conn |
||||||
|
end |
||||||
|
|
||||||
|
_ -> |
||||||
|
conn |
||||||
|
end |
||||||
|
else |
||||||
|
conn |
||||||
|
end |
||||||
|
end |
||||||
|
end |