master
nico 2 years ago
commit 07a8bc3f2b
  1. 627
      .circleci/config.yml
  2. 150
      .credo.exs
  3. 35
      .dialyzer-ignore
  4. 9
      .dockerignore
  5. 11
      .formatter.exs
  6. 19
      .github/dependabot.yml
  7. 72
      .github/workflows/codeql-analysis.yml
  8. 584
      .github/workflows/config.yml
  9. 86
      .github/workflows/e2e-tests.yml
  10. 82
      .github/workflows/publish-docker-image-every-push.yml
  11. 111
      .github/workflows/publish-docker-image-release.yml
  12. 57
      .gitignore
  13. 13
      .pairs
  14. 3
      .tool-versions
  15. 2046
      CHANGELOG.md
  16. 73
      CODE_OF_CONDUCT.md
  17. 62
      CONTRIBUTING.md
  18. 22
      ISSUE_TEMPLATE.md
  19. 674
      LICENSE
  20. 29
      PULL_REQUEST_TEMPLATE.md
  21. 52
      README.md
  22. 12
      apps/block_scout_web/.sobelow-conf
  23. 2228
      apps/block_scout_web/API blueprint.md
  24. 2227
      apps/block_scout_web/API.md
  25. 43
      apps/block_scout_web/README.md
  26. 3
      apps/block_scout_web/assets/.babelrc
  27. 6
      apps/block_scout_web/assets/.eslintrc
  28. 9
      apps/block_scout_web/assets/README.md
  29. 4
      apps/block_scout_web/assets/__mocks__/css/app.scss.js
  30. 82
      apps/block_scout_web/assets/__tests__/lib/async_listing_load.js
  31. 31
      apps/block_scout_web/assets/__tests__/lib/autocomplete.js
  32. 18
      apps/block_scout_web/assets/__tests__/lib/currency.js
  33. 285
      apps/block_scout_web/assets/__tests__/lib/smart_contract/common_helpers.js
  34. 12
      apps/block_scout_web/assets/__tests__/lib/utils.js
  35. 66
      apps/block_scout_web/assets/__tests__/pages/address.js
  36. 151
      apps/block_scout_web/assets/__tests__/pages/address/internal_transactions.js
  37. 128
      apps/block_scout_web/assets/__tests__/pages/address/transactions.js
  38. 50
      apps/block_scout_web/assets/__tests__/pages/address/validations.js
  39. 156
      apps/block_scout_web/assets/__tests__/pages/blocks.js
  40. 419
      apps/block_scout_web/assets/__tests__/pages/chain.js
  41. 212
      apps/block_scout_web/assets/__tests__/pages/pending_transactions.js
  42. 18
      apps/block_scout_web/assets/__tests__/pages/transaction.js
  43. 133
      apps/block_scout_web/assets/__tests__/pages/transactions.js
  44. 4
      apps/block_scout_web/assets/close.svg
  45. 46
      apps/block_scout_web/assets/css/_code.scss
  46. 29
      apps/block_scout_web/assets/css/_elements.scss
  47. 54
      apps/block_scout_web/assets/css/_helpers.scss
  48. 16
      apps/block_scout_web/assets/css/_layout.scss
  49. 253
      apps/block_scout_web/assets/css/_mixins.scss
  50. 130
      apps/block_scout_web/assets/css/_typography.scss
  51. 136
      apps/block_scout_web/assets/css/app.scss
  52. 143
      apps/block_scout_web/assets/css/components/_account.scss
  53. 9
      apps/block_scout_web/assets/css/components/_ad.scss
  54. 84
      apps/block_scout_web/assets/css/components/_address-overview.scss
  55. 23
      apps/block_scout_web/assets/css/components/_address_link.scss
  56. 9
      apps/block_scout_web/assets/css/components/_alerts.scss
  57. 94
      apps/block_scout_web/assets/css/components/_animations.scss
  58. 254
      apps/block_scout_web/assets/css/components/_api.scss
  59. 45
      apps/block_scout_web/assets/css/components/_badge.scss
  60. 28
      apps/block_scout_web/assets/css/components/_btn_add_to_mm.scss
  61. 11
      apps/block_scout_web/assets/css/components/_btn_address_card.scss
  62. 18
      apps/block_scout_web/assets/css/components/_btn_contract.scss
  63. 61
      apps/block_scout_web/assets/css/components/_btn_copy.scss
  64. 21
      apps/block_scout_web/assets/css/components/_btn_dropdown_line.scss
  65. 6
      apps/block_scout_web/assets/css/components/_btn_full.scss
  66. 16
      apps/block_scout_web/assets/css/components/_btn_line.scss
  67. 30
      apps/block_scout_web/assets/css/components/_btn_no_border.scss
  68. 6
      apps/block_scout_web/assets/css/components/_btn_qr.scss
  69. 32
      apps/block_scout_web/assets/css/components/_btn_swap.scss
  70. 10
      apps/block_scout_web/assets/css/components/_btn_wallet.scss
  71. 104
      apps/block_scout_web/assets/css/components/_button.scss
  72. 347
      apps/block_scout_web/assets/css/components/_card.scss
  73. 48
      apps/block_scout_web/assets/css/components/_check.scss
  74. 27
      apps/block_scout_web/assets/css/components/_check_tooltip.scss
  75. 9
      apps/block_scout_web/assets/css/components/_coin-balance-tile.scss
  76. 135
      apps/block_scout_web/assets/css/components/_custom_tooltips.scss
  77. 289
      apps/block_scout_web/assets/css/components/_dashboard-banner.scss
  78. 3
      apps/block_scout_web/assets/css/components/_description-list.scss
  79. 23
      apps/block_scout_web/assets/css/components/_dot.scss
  80. 116
      apps/block_scout_web/assets/css/components/_dropdown.scss
  81. 541
      apps/block_scout_web/assets/css/components/_dropzone.scss
  82. 11
      apps/block_scout_web/assets/css/components/_erc721_token_image_container.scss
  83. 137
      apps/block_scout_web/assets/css/components/_errors.scss
  84. 21
      apps/block_scout_web/assets/css/components/_external_link.scss
  85. 4
      apps/block_scout_web/assets/css/components/_filter.scss
  86. 55
      apps/block_scout_web/assets/css/components/_fontawesome_icon.scss
  87. 121
      apps/block_scout_web/assets/css/components/_footer.scss
  88. 152
      apps/block_scout_web/assets/css/components/_form.scss
  89. 17
      apps/block_scout_web/assets/css/components/_highlight.scss
  90. 27
      apps/block_scout_web/assets/css/components/_i_tooltip.scss
  91. 11
      apps/block_scout_web/assets/css/components/_i_tooltip_2.scss
  92. 36
      apps/block_scout_web/assets/css/components/_icon-link.scss
  93. 11
      apps/block_scout_web/assets/css/components/_inventory_token_instance_image_container.scss
  94. 104
      apps/block_scout_web/assets/css/components/_label.scss
  95. 87
      apps/block_scout_web/assets/css/components/_loading-spinner.scss
  96. 69
      apps/block_scout_web/assets/css/components/_log-search.scss
  97. 25
      apps/block_scout_web/assets/css/components/_me_tooltip.scss
  98. 110
      apps/block_scout_web/assets/css/components/_modal.scss
  99. 140
      apps/block_scout_web/assets/css/components/_modal_stake.scss
  100. 103
      apps/block_scout_web/assets/css/components/_modal_status.scss
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,627 @@
version: 2
jobs:
build:
docker:
# Ensure .tool-versions matches
- image: circleci/elixir:1.10.3-node-browsers
environment:
MIX_ENV: test
# match POSTGRES_PASSWORD for postgres image below
PGPASSWORD: postgres
# match POSTGRES_USER for postgres image below
PGUSER: postgres
working_directory: ~/app
steps:
- run: sudo apt-get update; sudo apt-get -y install autoconf build-essential libgmp3-dev libtool
- checkout
- run:
command: ./bin/install_chrome_headless.sh
no_output_timeout: 2400
- run: mix local.hex --force
- run: mix local.rebar --force
- run:
name: "ELIXIR_VERSION.lock"
command: echo "${ELIXIR_VERSION}" > ELIXIR_VERSION.lock
- run:
name: "OTP_VERSION.lock"
command: echo "${OTP_VERSION}" > OTP_VERSION.lock
- restore_cache:
keys:
- v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }}
- v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }}
- v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}
- run: mix deps.get
- restore_cache:
keys:
- v8-npm-install-{{ .Branch }}-{{ checksum "apps/block_scout_web/assets/package-lock.json" }}
- v8-npm-install-{{ .Branch }}
- v8-npm-install
- run:
command: npm install
working_directory: "apps/explorer"
- save_cache:
key: v3-npm-install-{{ .Branch }}-{{ checksum "apps/explorer/package-lock.json" }}
paths: "apps/explorer/node_modules"
- save_cache:
key: v3-npm-install-{{ .Branch }}
paths: "apps/explorer/node_modules"
- save_cache:
key: v3-npm-install
paths: "apps/explorer/node_modules"
- run:
command: npm install
working_directory: "apps/block_scout_web/assets"
- save_cache:
key: v8-npm-install-{{ .Branch }}-{{ checksum "apps/block_scout_web/assets/package-lock.json" }}
paths: "apps/block_scout_web/assets/node_modules"
- save_cache:
key: v8-npm-install-{{ .Branch }}
paths: "apps/block_scout_web/assets/node_modules"
- save_cache:
key: v8-npm-install
paths: "apps/block_scout_web/assets/node_modules"
- run: mix compile
# Ensure NIF is compiled for libsecp256k1
- run:
command: make
working_directory: "deps/libsecp256k1"
# `deps` needs to be cached with `_build` because `_build` will symlink into `deps`
- save_cache:
key: v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }}
paths:
- deps
- _build
- save_cache:
key: v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }}
paths:
- deps
- _build
- save_cache:
key: v8-mix-compile-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}
paths:
- deps
- _build
- run:
name: Build assets
command: node node_modules/webpack/bin/webpack.js --mode development
working_directory: "apps/block_scout_web/assets"
- persist_to_workspace:
root: .
paths:
- .circleci
- .credo.exs
- .dialyzer-ignore
- .formatter.exs
- .git
- .gitignore
- ELIXIR_VERSION.lock
- Gemfile
- Gemfile.lock
- OTP_VERSION.lock
- _build
- apps
- bin
- config
- deps
- doc
- mix.exs
- mix.lock
- appspec.yml
- rel
check_formatted:
docker:
# Ensure .tool-versions matches
- image: circleci/elixir:1.10.3
environment:
MIX_ENV: test
working_directory: ~/app
steps:
- attach_workspace:
at: .
- run: mix format --check-formatted
credo:
docker:
# Ensure .tool-versions matches
- image: circleci/elixir:1.10.3
environment:
MIX_ENV: test
working_directory: ~/app
steps:
- attach_workspace:
at: .
- run: mix local.hex --force
- run: mix credo
deploy_aws:
docker:
# Ensure .tool-versions matches
- image: circleci/python:2.7-stretch
working_directory: ~/app
steps:
- attach_workspace:
at: .
- add_ssh_keys:
fingerprints:
- "c4:fd:a8:f8:48:a8:09:e5:3e:be:30:62:4d:6f:6f:36"
- run:
name: Deploy to AWS
command: bin/deploy
dialyzer:
docker:
# Ensure .tool-versions matches
- image: circleci/elixir:1.10.3
environment:
MIX_ENV: test
working_directory: ~/app
steps:
- attach_workspace:
at: .
- run: mix local.hex --force
- restore_cache:
keys:
- v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }}
- v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }}
- v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}
- run:
name: Unpack PLT cache
command: |
mkdir -p _build/test
cp plts/dialyxir*.plt _build/test/ || true
mkdir -p ~/.mix
cp plts/dialyxir*.plt ~/.mix/ || true
- run: mix dialyzer --plt
- run:
name: Pack PLT cache
command: |
mkdir -p plts
cp _build/test/dialyxir*.plt plts/
cp ~/.mix/dialyxir*.plt plts/
- save_cache:
key: v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }}
paths:
- plts
- save_cache:
key: v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }}
paths:
- plts
- save_cache:
key: v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}
paths:
- plts
- run: mix dialyzer --halt-exit-status
eslint:
docker:
# Ensure .tool-versions matches
- image: circleci/node:12.18.2-browsers-legacy
working_directory: ~/app
steps:
- attach_workspace:
at: .
- run:
name: ESLint
command: ./node_modules/.bin/eslint --format=junit --output-file="test/eslint/junit.xml" js/**
working_directory: apps/block_scout_web/assets
- store_test_results:
path: apps/block_scout_web/assets/test
gettext:
docker:
# Ensure .tool-versions matches
- image: circleci/elixir:1.10.3
environment:
MIX_ENV: test
working_directory: ~/app
steps:
- attach_workspace:
at: .
- run: mix local.hex --force
- run:
name: Check for missed translations
command: |
mix gettext.extract --merge | tee stdout.txt
! grep "Wrote " stdout.txt
working_directory: "apps/block_scout_web"
- store_artifacts:
path: apps/block_scout_web/priv/gettext
jest:
docker:
# Ensure .tool-versions matches
- image: circleci/node:12.18.2-browsers-legacy
working_directory: ~/app
steps:
- attach_workspace:
at: .
- run:
name: Jest
command: ./node_modules/.bin/jest
working_directory: apps/block_scout_web/assets
release:
docker:
# Ensure .tool-versions matches
- image: circleci/elixir:1.10.3
environment:
MIX_ENV: prod
working_directory: ~/app
steps:
- attach_workspace:
at: .
- run: mix local.hex --force
- run: mix local.rebar --force
- run: MIX_ENV=prod mix release
- run:
name: Collecting artifacts
command: |
find -name 'blockscout.tar.gz' -exec sh -c 'mkdir -p ci_artifact && cp "$@" ci_artifact/ci_artifact_blockscout.tar.gz' _ {} +
when: always
- store_artifacts:
name: Uploading CI artifacts
path: ci_artifact/ci_artifact_blockscout.tar.gz
destination: ci_artifact_blockscout.tar.gz
sobelow:
docker:
# Ensure .tool-versions matches
- image: circleci/elixir:1.10.3
environment:
MIX_ENV: test
working_directory: ~/app
steps:
- attach_workspace:
at: .
- run: mix local.hex --force
- run:
name: Scan explorer for vulnerabilities
command: mix sobelow --config
working_directory: "apps/explorer"
- run:
name: Scan block_scout_web for vulnerabilities
command: mix sobelow --config
working_directory: "apps/block_scout_web"
# test_geth_http_websocket:
# docker:
# # Ensure .tool-versions matches
# - image: circleci/elixir:1.10.3-node-browsers
# environment:
# MIX_ENV: test
# # match POSTGRES_PASSWORD for postgres image below
# PGPASSWORD: postgres
# # match POSTGRES_USER for postgres image below
# PGUSER: postgres
# ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Geth.HTTPWebSocket"
# ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Geth"
# - image: circleci/postgres:10.10-alpine
# environment:
# # Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database
# POSTGRES_DB: explorer_test
# # match PGPASSWORD for elixir image above
# POSTGRES_PASSWORD: postgres
# # match PGUSER for elixir image above
# POSTGRES_USER: postgres
# working_directory: ~/app
# steps:
# - attach_workspace:
# at: .
# - run:
# command: ./bin/install_chrome_headless.sh
# no_output_timeout: 2400
# - run: mix local.hex --force
# - run: mix local.rebar --force
# - run:
# name: Wait for DB
# command: dockerize -wait tcp://localhost:5432 -timeout 1m
# - run:
# name: mix test --exclude no_geth
# command: |
# # Don't submit coverage report for forks, but let the build succeed
# if [[ -z "$COVERALLS_REPO_TOKEN" ]]; then
# mix coveralls.html --exclude no_geth --parallel --umbrella
# else
# mix coveralls.circle --exclude no_geth --parallel --umbrella ||
# # if mix failed, then coveralls_merge won't run, so signal done here and return original exit status
# (retval=$? && curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_WORKFLOW_WORKSPACE_ID&payload[status]=done" && return $retval)
# fi
# - store_artifacts:
# path: cover/excoveralls.html
# - store_test_results:
# path: _build/test/junit
# test_geth_mox:
# docker:
# # Ensure .tool-versions matches
# - image: circleci/elixir:1.10.3-node-browsers
# environment:
# MIX_ENV: test
# # match POSTGRES_PASSWORD for postgres image below
# PGPASSWORD: postgres
# # match POSTGRES_USER for postgres image below
# PGUSER: postgres
# ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Geth.Mox"
# ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox"
# - image: circleci/postgres:10.10-alpine
# environment:
# # Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database
# POSTGRES_DB: explorer_test
# # match PGPASSWORD for elixir image above
# POSTGRES_PASSWORD: postgres
# # match PGUSER for elixir image above
# POSTGRES_USER: postgres
# working_directory: ~/app
# steps:
# - attach_workspace:
# at: .
# - run:
# command: ./bin/install_chrome_headless.sh
# no_output_timeout: 2400
# - run: mix local.hex --force
# - run: mix local.rebar --force
# - run:
# name: Wait for DB
# command: dockerize -wait tcp://localhost:5432 -timeout 1m
# - run:
# name: mix test --exclude no_geth
# command: |
# # Don't submit coverage report for forks, but let the build succeed
# if [[ -z "$COVERALLS_REPO_TOKEN" ]]; then
# mix coveralls.html --exclude no_geth --parallel --umbrella
# else
# mix coveralls.circle --exclude no_geth --parallel --umbrella ||
# # if mix failed, then coveralls_merge won't run, so signal done here and return original exit status
# (retval=$? && curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_WORKFLOW_WORKSPACE_ID&payload[status]=done" && return $retval)
# fi
# - store_artifacts:
# path: cover/excoveralls.html
# - store_test_results:
# path: _build/test/junit
# test_nethermind_http_websocket:
# docker:
# # Ensure .tool-versions matches
# - image: circleci/elixir:1.10.3-node-browsers
# environment:
# MIX_ENV: test
# # match POSTGRES_PASSWORD for postgres image below
# PGPASSWORD: postgres
# # match POSTGRES_USER for postgres image below
# PGUSER: postgres
# ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Nethermind.HTTPWebSocket"
# ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Nethermind"
# - image: circleci/postgres:10.10-alpine
# environment:
# # Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database
# POSTGRES_DB: explorer_test
# # match PGPASSWORD for elixir image above
# POSTGRES_PASSWORD: postgres
# # match PGUSER for elixir image above
# POSTGRES_USER: postgres
# working_directory: ~/app
# steps:
# - attach_workspace:
# at: .
# - run:
# command: ./bin/install_chrome_headless.sh
# no_output_timeout: 2400
# - run: mix local.hex --force
# - run: mix local.rebar --force
# - run:
# name: Wait for DB
# command: dockerize -wait tcp://localhost:5432 -timeout 1m
# - run:
# name: mix test --exclude no_nethermind
# command: |
# # Don't submit coverage report for forks, but let the build succeed
# if [[ -z "$COVERALLS_REPO_TOKEN" ]]; then
# mix coveralls.html --exclude no_nethermind --parallel --umbrella
# else
# mix coveralls.circle --exclude no_nethermind --parallel --umbrella ||
# # if mix failed, then coveralls_merge won't run, so signal done here and return original exit status
# (retval=$? && curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_WORKFLOW_WORKSPACE_ID&payload[status]=done" && return $retval)
# fi
# - store_artifacts:
# path: cover/excoveralls.html
# - store_test_results:
# path: _build/test/junit
test_nethermind_mox:
docker:
# Ensure .tool-versions matches
- image: circleci/elixir:1.10.3-node-browsers
environment:
MIX_ENV: test
# match POSTGRES_PASSWORD for postgres image below
PGPASSWORD: postgres
# match POSTGRES_USER for postgres image below
PGUSER: postgres
ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Nethermind.Mox"
ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox"
- image: circleci/postgres:10.10-alpine
environment:
# Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database
POSTGRES_DB: explorer_test
# match PGPASSWORD for elixir image above
POSTGRES_PASSWORD: postgres
# match PGUSER for elixir image above
POSTGRES_USER: postgres
working_directory: ~/app
steps:
- attach_workspace:
at: .
- run:
command: ./bin/install_chrome_headless.sh
no_output_timeout: 2400
- run: mix local.hex --force
- run: mix local.rebar --force
- run:
name: Wait for DB
command: dockerize -wait tcp://localhost:5432 -timeout 1m
- run:
name: mix test --exclude no_nethermind
command: |
# Don't submit coverage report for forks, but let the build succeed
if [[ -z "$COVERALLS_REPO_TOKEN" ]]; then
mix coveralls.html --exclude no_nethermind --parallel --umbrella
else
mix coveralls.circle --exclude no_nethermind --parallel --umbrella ||
# if mix failed, then coveralls_merge won't run, so signal done here and return original exit status
(retval=$? && curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_WORKFLOW_WORKSPACE_ID&payload[status]=done" && return $retval)
fi
- store_artifacts:
path: cover/excoveralls.html
- store_test_results:
path: _build/test/junit
coveralls_merge:
docker:
# Ensure .tool-versions matches
- image: circleci/elixir:1.10.3
environment:
MIX_ENV: test
steps:
- run:
name: Tell coveralls.io build is done
command: curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_WORKFLOW_WORKSPACE_ID&payload[status]=done"
workflows:
version: 2
primary:
jobs:
- build
- check_formatted:
requires:
- build
# This unfortunately will only fire if all the tests pass because of how `requires` works
- coveralls_merge:
requires:
# - test_nethermind_http_websocket
- test_nethermind_mox
# - test_geth_http_websocket
# - test_geth_mox
- credo:
requires:
- build
- deploy_aws:
filters:
branches:
only:
- production
- staging
- /deploy-[A-Za-z0-9]+$/
requires:
- check_formatted
- credo
- eslint
- jest
- sobelow
# - test_nethermind_http_websocket
- test_nethermind_mox
# - test_geth_http_websocket
# - test_geth_mox
- dialyzer:
requires:
- build
- eslint:
requires:
- build
- gettext:
requires:
- build
- jest:
requires:
- build
- release:
requires:
- build
- sobelow:
requires:
- build
# - test_nethermind_http_websocket:
# requires:
# - build
- test_nethermind_mox:
requires:
- build
# - test_geth_http_websocket:
# requires:
# - build
# - test_geth_mox:
# requires:
# - build

@ -0,0 +1,150 @@
# This file contains the configuration for Credo and you are probably reading
# this after creating it with `mix credo.gen.config`.
#
# If you find anything wrong or unclear in this file, please report an
# issue on GitHub: https://github.com/rrrene/credo/issues
#
%{
#
# You can have as many configs as you like in the `configs:` field.
configs: [
%{
#
# Run any exec using `mix credo -C <name>`. If no exec name is given
# "default" is used.
#
name: "default",
#
# These are the files included in the analysis:
files: %{
#
# You can give explicit globs or simply directories.
# In the latter case `**/*.{ex,exs}` will be used.
#
included: ["lib/", "src/", "web/", "apps/*/lib/**/*.{ex,exs}"],
excluded: [
~r"/_build/",
~r"/deps/",
~r"/node_modules/",
~r"/apps/block_scout_web/lib/block_scout_web.ex"
]
},
#
# If you create your own checks, you must specify the source files for
# them here, so they can be loaded by Credo before running the analysis.
#
requires: [],
#
# If you want to enforce a style guide and need a more traditional linting
# experience, you can change `strict` to `true` below:
#
strict: true,
#
# If you want to use uncolored output by default, you can change `color`
# to `false` below:
#
color: true,
#
# You can customize the parameters of any check by adding a second element
# to the tuple.
#
# To disable a check put `false` as second element:
#
# {Credo.Check.Design.DuplicatedCode, false}
#
checks: [
# outdated by formatter in Elixir 1.6. See https://github.com/rrrene/credo/issues/505
{Credo.Check.Consistency.LineEndings, false},
{Credo.Check.Consistency.SpaceAroundOperators, false},
{Credo.Check.Consistency.SpaceInParentheses, false},
{Credo.Check.Consistency.TabsOrSpaces, false},
{Credo.Check.Readability.LargeNumbers, false},
{Credo.Check.Readability.MaxLineLength, false},
{Credo.Check.Readability.ParenthesesInCondition, false},
{Credo.Check.Readability.RedundantBlankLines, false},
{Credo.Check.Readability.Semicolons, false},
{Credo.Check.Readability.SpaceAfterCommas, false},
{Credo.Check.Readability.TrailingBlankLine, false},
{Credo.Check.Readability.TrailingWhiteSpace, false},
# outdated by lazy Logger in Elixir 1.7. See https://elixir-lang.org/blog/2018/07/25/elixir-v1-7-0-released/
{Credo.Check.Warning.LazyLogging, false},
# not handled by formatter
{Credo.Check.Consistency.ExceptionNames},
{Credo.Check.Consistency.ParameterPatternMatching},
# You can customize the priority of any check
# Priority values are: `low, normal, high, higher`
#
{Credo.Check.Design.AliasUsage,
excluded_namespaces: ~w(Block Blocks Import Runner Socket SpandexDatadog Task),
excluded_lastnames:
~w(Address DateTime Exporter Fetcher Full Instrumenter Logger Monitor Name Number Repo Spec Time Unit),
priority: :low},
# For some checks, you can also set other parameters
#
# If you don't want the `setup` and `test` macro calls in ExUnit tests
# or the `schema` macro in Ecto schemas to trigger DuplicatedCode, just
# set the `excluded_macros` parameter to `[:schema, :setup, :test]`.
#
{Credo.Check.Design.DuplicatedCode, excluded_macros: [], mass_threshold: 80},
# You can also customize the exit_status of each check.
# If you don't want TODO comments to cause `mix credo` to fail, just
# set this value to 0 (zero).
#
{Credo.Check.Design.TagTODO, exit_status: 0},
{Credo.Check.Design.TagFIXME},
{Credo.Check.Readability.FunctionNames},
{Credo.Check.Readability.ModuleAttributeNames},
{Credo.Check.Readability.ModuleDoc},
{Credo.Check.Readability.ModuleNames},
{Credo.Check.Readability.ParenthesesOnZeroArityDefs},
{Credo.Check.Readability.PredicateFunctionNames},
{Credo.Check.Readability.PreferImplicitTry},
{Credo.Check.Readability.StringSigils},
{Credo.Check.Readability.VariableNames},
{Credo.Check.Refactor.DoubleBooleanNegation},
{Credo.Check.Refactor.CondStatements},
{Credo.Check.Refactor.CyclomaticComplexity},
{Credo.Check.Refactor.FunctionArity},
{Credo.Check.Refactor.LongQuoteBlocks},
{Credo.Check.Refactor.MatchInCondition},
{Credo.Check.Refactor.NegatedConditionsInUnless},
{Credo.Check.Refactor.NegatedConditionsWithElse},
{Credo.Check.Refactor.Nesting},
{Credo.Check.Refactor.PipeChainStart},
{Credo.Check.Refactor.UnlessWithElse},
{Credo.Check.Warning.BoolOperationOnSameValues},
{Credo.Check.Warning.ExpensiveEmptyEnumCheck},
{Credo.Check.Warning.IExPry},
{Credo.Check.Warning.IoInspect},
{Credo.Check.Warning.OperationOnSameValues},
{Credo.Check.Warning.OperationWithConstantResult},
{Credo.Check.Warning.UnusedEnumOperation},
{Credo.Check.Warning.UnusedFileOperation},
{Credo.Check.Warning.UnusedKeywordOperation},
{Credo.Check.Warning.UnusedListOperation},
{Credo.Check.Warning.UnusedPathOperation},
{Credo.Check.Warning.UnusedRegexOperation},
{Credo.Check.Warning.UnusedStringOperation},
{Credo.Check.Warning.UnusedTupleOperation},
{Credo.Check.Warning.RaiseInsideRescue, false},
# Controversial and experimental checks (opt-in, just remove `, false`)
#
# TODO reenable before merging optimized-indexer branch
{Credo.Check.Refactor.ABCSize, false},
{Credo.Check.Refactor.AppendSingleItem},
{Credo.Check.Refactor.VariableRebinding},
{Credo.Check.Warning.MapGetUnsafePass},
{Credo.Check.Consistency.MultiAliasImportRequireUse}
# Custom checks can be created using `mix credo.gen.check`.
#
]
}
]
}

@ -0,0 +1,35 @@
:0: Unknown function 'Elixir.ExUnit.Callbacks':'__merge__'/3
:0: Unknown function 'Elixir.ExUnit.CaseTemplate':'__proxy__'/2
:0: Unknown type 'Elixir.Map':t/0
:0: Unknown type 'Elixir.Hash':t/0
:0: Unknown type 'Elixir.Address':t/0
apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex:400: Function timestamp_to_datetime/1 has no local return
lib/ethereum_jsonrpc/rolling_window.ex:173
lib/explorer/repo/prometheus_logger.ex:8
lib/explorer/smart_contract/solidity/publisher_worker.ex:1
lib/explorer/smart_contract/vyper/publisher_worker.ex:1
lib/explorer/smart_contract/solidity/publisher_worker.ex:6
lib/explorer/smart_contract/vyper/publisher_worker.ex:6
apps/explorer/lib/explorer/repo/prometheus_logger.ex:8: Function microseconds_time/1 has no local return
apps/explorer/lib/explorer/repo/prometheus_logger.ex:8: The call 'Elixir.System':convert_time_unit(__@1::any(),'native','microseconds') breaks the contract (integer(),time_unit() | 'native',time_unit() | 'native') -> integer()
lib/block_scout_web/router.ex:1
lib/block_scout_web/schema/types.ex:31
lib/phoenix/router.ex:324
lib/phoenix/router.ex:402
lib/block_scout_web/views/layout_view.ex:145: The call 'Elixir.Poison.Parser':'parse!'
lib/block_scout_web/views/layout_view.ex:237: The call 'Elixir.Poison.Parser':'parse!'
lib/explorer/smart_contract/reader.ex:435
lib/indexer/fetcher/token_total_supply_on_demand.ex:16
lib/explorer/exchange_rates/source.ex:116
lib/explorer/exchange_rates/source.ex:119
lib/explorer/smart_contract/solidity/verifier.ex:310
lib/block_scout_web/templates/address_contract/index.html.eex:158
lib/block_scout_web/templates/address_contract/index.html.eex:195
lib/explorer/third_party_integrations/sourcify.ex:120
lib/explorer/third_party_integrations/sourcify.ex:123
lib/block_scout_web/views/transaction_view.ex:137
lib/block_scout_web/views/transaction_view.ex:152
lib/block_scout_web/views/transaction_view.ex:197
lib/indexer/buffered_task.ex:402
lib/indexer/buffered_task.ex:451
lib/indexer/memory/monitor.ex:160

@ -0,0 +1,9 @@
_build
deps
apps/block_scout_web/assets/node_modules
apps/explorer/node_modules
test
.git
.circleci
logs
apps/*/test

@ -0,0 +1,11 @@
[
inputs: [
".credo.exs",
".formatter.exs",
"apps/*/mix.exs",
"apps/*/{benchmarks,config,lib,priv,test}/**/*.{ex,exs}",
"mix.exs",
"{config}/**/*.{ex,exs}"
],
line_length: 120
]

@ -0,0 +1,19 @@
version: 2
updates:
- package-ecosystem: "mix"
directory: "/"
open-pull-requests-limit: 20
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/apps/block_scout_web/assets"
open-pull-requests-limit: 10
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/apps/explorer"
open-pull-requests-limit: 10
schedule:
interval: "daily"

@ -0,0 +1,72 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '45 11 * * 5'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# ℹ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

@ -0,0 +1,584 @@
name: Blockscout
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
MIX_ENV: test
OTP_VERSION: '24.3.4.1'
ELIXIR_VERSION: '1.13.4'
ACCOUNT_AUTH0_DOMAIN: 'blockscoutcom.us.auth0.com'
ACCOUNT_AUTH0_LOGOUT_URL: 'https://blockscoutcom.us.auth0.com/v2/logout'
ACCOUNT_AUTH0_LOGOUT_RETURN_URL: 'https://blockscout.com/auth/logout'
jobs:
build-and-cache:
name: Build and Cache deps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- name: "ELIXIR_VERSION.lock"
run: echo "${ELIXIR_VERSION}" > ELIXIR_VERSION.lock
- name: "OTP_VERSION.lock"
run: echo "${OTP_VERSION}" > OTP_VERSION.lock
- name: Restore Mix Deps Cache
uses: actions/cache@v2
id: deps-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-
- name: Conditionally build Mix deps cache
if: steps.deps-cache.outputs.cache-hit != 'true'
run: |
mix local.hex --force
mix local.rebar --force
mix deps.get
mix deps.compile
cd deps/libsecp256k1
make
- name: Restore Explorer NPM Cache
uses: actions/cache@v2
id: explorer-npm-cache
with:
path: apps/explorer/node_modules
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-explorer-npm-${{ hashFiles('apps/explorer/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-explorer-npm-
- name: Conditionally build Explorer NPM Cache
if: steps.explorer-npm-cache.outputs.cache-hit != 'true'
run: npm install
working-directory: apps/explorer
- name: Restore Blockscout Web NPM Cache
uses: actions/cache@v2
id: blockscoutweb-npm-cache
with:
path: apps/block_scout_web/assets/node_modules
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-blockscoutweb-npm-${{ hashFiles('apps/block_scout_web/assets/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-blockscoutweb-npm-
- name: Conditionally build Blockscout Web NPM Cache
if: steps.blockscoutweb-npm-cache.outputs.cache-hit != 'true'
run: npm install
working-directory: apps/block_scout_web/assets
credo:
name: Credo
runs-on: ubuntu-latest
needs: build-and-cache
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- name: Restore Mix Deps Cache
uses: actions/cache@v2
id: deps-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
- run: mix credo
check_formatted:
name: Code formatting checks
runs-on: ubuntu-latest
needs: build-and-cache
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- name: Restore Mix Deps Cache
uses: actions/cache@v2
id: deps-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
- run: mix format --check-formatted
dialyzer:
name: Dialyzer static analysis
runs-on: ubuntu-latest
needs: build-and-cache
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- name: Restore Mix Deps Cache
uses: actions/cache@v2
id: deps-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
- name: Restore Dialyzer Cache
uses: actions/cache@v2
id: dialyzer-cache
with:
path: priv/plts
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-mixlockhash_16-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-"
- name: Conditionally build Dialyzer Cache
if: steps.dialyzer-cache.output.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix dialyzer --plt
- name: Run Dialyzer
run: mix dialyzer --halt-exit-status
gettext:
name: Missing translation keys check
runs-on: ubuntu-latest
needs: build-and-cache
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- name: Restore Mix Deps Cache
uses: actions/cache@v2
id: deps-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
- run: |
mix gettext.extract --merge | tee stdout.txt
! grep "Wrote " stdout.txt
working-directory: "apps/block_scout_web"
sobelow:
name: Sobelow security analysis
runs-on: ubuntu-latest
needs: build-and-cache
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- name: Mix Deps Cache
uses: actions/cache@v2
id: deps-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
- name: Scan explorer for vulnerabilities
run: mix sobelow --config
working-directory: "apps/explorer"
- name: Scan block_scout_web for vulnerabilities
run: mix sobelow --config
working-directory: "apps/block_scout_web"
eslint:
name: ESLint
runs-on: ubuntu-latest
needs: build-and-cache
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- name: Mix Deps Cache
uses: actions/cache@v2
id: deps-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
- name: Restore Explorer NPM Cache
uses: actions/cache@v2
id: explorer-npm-cache
with:
path: apps/explorer/node_modules
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-explorer-npm-${{ hashFiles('apps/explorer/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-explorer-npm-
- name: Restore Blockscout Web NPM Cache
uses: actions/cache@v2
id: blockscoutweb-npm-cache
with:
path: apps/block_scout_web/assets/node_modules
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-blockscoutweb-npm-${{ hashFiles('apps/block_scout_web/assets/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-blockscoutweb-npm-
- name: Build assets
run: node node_modules/webpack/bin/webpack.js --mode development
working-directory: "apps/block_scout_web/assets"
- run: ./node_modules/.bin/eslint --format=junit --output-file="test/eslint/junit.xml" js/**
working-directory: apps/block_scout_web/assets
jest:
name: JS Tests
runs-on: ubuntu-latest
needs: build-and-cache
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- name: Mix Deps Cache
uses: actions/cache@v2
id: deps-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
- name: Restore Blockscout Web NPM Cache
uses: actions/cache@v2
id: blockscoutweb-npm-cache
with:
path: apps/block_scout_web/assets/node_modules
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-blockscoutweb-npm-${{ hashFiles('apps/block_scout_web/assets/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-blockscoutweb-npm-
- name: Build assets
run: node node_modules/webpack/bin/webpack.js --mode development
working-directory: "apps/block_scout_web/assets"
- run: ./node_modules/.bin/jest
working-directory: apps/block_scout_web/assets
test_nethermind_mox_ethereum_jsonrpc:
name: EthereumJSONRPC Tests
runs-on: ubuntu-latest
needs: build-and-cache
services:
postgres:
image: postgres
env:
# Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database
POSTGRES_DB: explorer_test
# match PGPASSWORD for elixir image above
POSTGRES_PASSWORD: postgres
# match PGUSER for elixir image above
POSTGRES_USER: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- run: echo 'export PATH=~/.cargo/bin/:$PATH' >> $GITHUB_ENV
- name: Mix Deps Cache
uses: actions/cache@v2
id: deps-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
- run: ./bin/install_chrome_headless.sh
- name: mix test --exclude no_nethermind
run: |
cd apps/ethereum_jsonrpc
mix compile
mix test --no-start --exclude no_nethermind
env:
# match POSTGRES_PASSWORD for postgres image below
PGPASSWORD: postgres
# match POSTGRES_USER for postgres image below
PGUSER: postgres
ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Nethermind.Mox"
ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox"
test_nethermind_mox_explorer:
name: Explorer Tests
runs-on: ubuntu-latest
needs: build-and-cache
services:
postgres:
image: postgres
env:
# Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database
POSTGRES_DB: explorer_test
# match PGPASSWORD for elixir image above
POSTGRES_PASSWORD: postgres
# match PGUSER for elixir image above
POSTGRES_USER: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- run: echo 'export PATH=~/.cargo/bin/:$PATH' >> $GITHUB_ENV
- name: Mix Deps Cache
uses: actions/cache@v2
id: deps-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
- name: Restore Explorer NPM Cache
uses: actions/cache@v2
id: explorer-npm-cache
with:
path: apps/explorer/node_modules
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-explorer-npm-${{ hashFiles('apps/explorer/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-explorer-npm
- run: ./bin/install_chrome_headless.sh
- name: mix test --exclude no_nethermind
run: |
mix ecto.create --quiet
mix ecto.migrate
cd apps/explorer
mix compile
mix test --no-start --exclude no_nethermind
env:
# match POSTGRES_PASSWORD for postgres image below
PGPASSWORD: postgres
# match POSTGRES_USER for postgres image below
PGUSER: postgres
ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Nethermind.Mox"
ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox"
test_nethermind_mox_indexer:
name: Indexer Tests
runs-on: ubuntu-latest
needs: build-and-cache
services:
postgres:
image: postgres
env:
# Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database
POSTGRES_DB: explorer_test
# match PGPASSWORD for elixir image above
POSTGRES_PASSWORD: postgres
# match PGUSER for elixir image above
POSTGRES_USER: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- run: echo 'export PATH=~/.cargo/bin/:$PATH' >> $GITHUB_ENV
- name: Mix Deps Cache
uses: actions/cache@v2
id: deps-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
- run: ./bin/install_chrome_headless.sh
- name: mix test --exclude no_nethermind
run: |
mix ecto.create --quiet
mix ecto.migrate
cd apps/indexer
mix compile
mix test --no-start --exclude no_nethermind
env:
# match POSTGRES_PASSWORD for postgres image below
PGPASSWORD: postgres
# match POSTGRES_USER for postgres image below
PGUSER: postgres
ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Nethermind.Mox"
ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox"
test_nethermind_mox_block_scout_web:
name: Blockscout Web Tests
runs-on: ubuntu-latest
needs: build-and-cache
services:
redis_db:
image: 'redis:alpine'
ports:
- 6379:6379
postgres:
image: postgres
env:
# Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database
POSTGRES_DB: explorer_test
# match PGPASSWORD for elixir image above
POSTGRES_PASSWORD: postgres
# match PGUSER for elixir image above
POSTGRES_USER: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- run: echo 'export PATH=~/.cargo/bin/:$PATH' >> $GITHUB_ENV
- name: Mix Deps Cache
uses: actions/cache@v2
id: deps-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
- name: Restore Explorer NPM Cache
uses: actions/cache@v2
id: explorer-npm-cache
with:
path: apps/explorer/node_modules
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-explorer-npm-${{ hashFiles('apps/explorer/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-explorer-npm-
- name: Restore Blockscout Web NPM Cache
uses: actions/cache@v2
id: blockscoutweb-npm-cache
with:
path: apps/block_scout_web/assets/node_modules
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-blockscoutweb-npm-${{ hashFiles('apps/block_scout_web/assets/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-blockscoutweb-npm-
- name: Build assets
run: node node_modules/webpack/bin/webpack.js --mode development
working-directory: "apps/block_scout_web/assets"
- run: ./bin/install_chrome_headless.sh
- name: mix test --exclude no_nethermind
run: |
mix ecto.create --quiet
mix ecto.migrate
cd apps/block_scout_web
mix compile
mix test --no-start --exclude no_nethermind
env:
# match POSTGRES_PASSWORD for postgres image below
PGPASSWORD: postgres
# match POSTGRES_USER for postgres image below
PGUSER: postgres
ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Nethermind.Mox"
ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox"
CHAIN_ID: "77"
ADMIN_PANEL_ENABLED: "true"
ACCOUNT_ENABLED: "true"
ACCOUNT_REDIS_URL: "redis://localhost:6379"

@ -0,0 +1,86 @@
name: Run E2E tests k8s
on:
# push:
pull_request:
workflow_dispatch:
env:
K8S_LOCAL_PORT: ${{ secrets.K8S_LOCAL_PORT }}
K8S_HOST: ${{ secrets.K8S_HOST }}
BASTION_HOST: ${{ secrets.BASTION_HOST }}
K8S_PORT: ${{ secrets.K8S_PORT }}
USERNAME: ${{ secrets.USERNAME }}
BASTION_SSH_KEY: ${{secrets.BASTION_SSH_KEY}}
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
outputs:
release-version: ${{ steps.output-step.outputs.release-version }}
short-sha: ${{ steps.output-step.outputs.short-sha }}
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: blockscout/blockscout
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Add outputs
run: |
echo "::set-output name=short-sha::${{ env.SHORT_SHA }}"
id: output-step
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ./docker/Dockerfile
push: true
cache-from: type=registry,ref=blockscout/blockscout:pr-buildcache
cache-to: type=registry,ref=blockscout/blockscout:pr-buildcache,mode=max
tags: blockscout/blockscout:pr-${{ env.SHORT_SHA }}
build-args: |
CACHE_EXCHANGE_RATES_PERIOD=
DISABLE_READ_API=false
API_PATH=
NETWORK_PATH=
DISABLE_WEBAPP=false
DISABLE_WRITE_API=false
CACHE_ENABLE_TOTAL_GAS_USAGE_COUNTER=
WOBSERVER_ENABLED=false
ADMIN_PANEL_ENABLED=false
CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL=
DISABLE_BRIDGE_MARKET_CAP_UPDATER=false
CACHE_BRIDGE_MARKET_CAP_UPDATE_INTERVAL=
SOCKET_ROOT=
deploy_and_tests:
needs: push_to_registry
uses: blockscout/blockscout-ci-cd/.github/workflows/e2e_new.yaml@master
with:
blockscoutImage: blockscout/blockscout:pr-${{ needs.push_to_registry.outputs.short-sha }}
blockscoutIngressHost: e2e-blockscout-$GITHUB_SHA_SHORT
frontendIngressHost: e2e-blockscout-$GITHUB_SHA_SHORT
gethIngressHost: e2e-geth-$GITHUB_SHA_SHORT
scVerifierIngressHost: e2e-sc-verifier-$GITHUB_SHA_SHORT
secrets: inherit

@ -0,0 +1,82 @@
name: Publish Docker image on every push to master branch
on:
push:
branches:
- master
env:
OTP_VERSION: '24.3.4.1'
ELIXIR_VERSION: '1.13.4'
NEXT_RELEASE_VERSION: 5.0.0
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
outputs:
release-version: ${{ steps.output-step.outputs.release-version }}
short-sha: ${{ steps.output-step.outputs.short-sha }}
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: blockscout/blockscout
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Add outputs
run: |
echo "::set-output name=release-version::${{ env.NEXT_RELEASE_VERSION }}"
echo "::set-output name=short-sha::${{ env.SHORT_SHA }}"
id: output-step
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ./docker/Dockerfile
push: true
cache-from: type=registry,ref=blockscout/blockscout:buildcache
cache-to: type=registry,ref=blockscout/blockscout:buildcache,mode=max
tags: blockscout/blockscout:latest, blockscout/blockscout:${{ env.NEXT_RELEASE_VERSION }}-prerelease-${{ env.SHORT_SHA }}
build-args: |
CACHE_EXCHANGE_RATES_PERIOD=
DISABLE_READ_API=false
API_PATH=
NETWORK_PATH=
DISABLE_WEBAPP=false
DISABLE_WRITE_API=false
CACHE_ENABLE_TOTAL_GAS_USAGE_COUNTER=
WOBSERVER_ENABLED=false
ADMIN_PANEL_ENABLED=false
CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL=
DISABLE_BRIDGE_MARKET_CAP_UPDATER=false
CACHE_BRIDGE_MARKET_CAP_UPDATE_INTERVAL=
SOCKET_ROOT=
tests:
needs: push_to_registry
uses: blockscout/blockscout-ci-cd/.github/workflows/e2e_new.yaml@master
with:
blockscoutImage: blockscout/blockscout:${{ needs.push_to_registry.outputs.release-version }}-prerelease-${{ needs.push_to_registry.outputs.short-sha }}
blockscoutIngressHost: e2e-blockscout-$GITHUB_SHA_SHORT
frontendIngressHost: e2e-blockscout-$GITHUB_SHA_SHORT
gethIngressHost: e2e-geth-$GITHUB_SHA_SHORT
scVerifierIngressHost: e2e-sc-verifier-$GITHUB_SHA_SHORT
secrets: inherit

@ -0,0 +1,111 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Publish Docker image
on:
release:
types: [published]
env:
OTP_VERSION: '24.3.4.1'
ELIXIR_VERSION: '1.13.4'
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
env:
RELEASE_VERSION: 4.1.8
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: blockscout/blockscout
- name: Build & Push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ./docker/Dockerfile
push: true
cache-from: type=registry,ref=blockscout/blockscout:buildcache
cache-to: type=registry,ref=blockscout/blockscout:buildcache,mode=max
tags: blockscout/blockscout:latest, blockscout/blockscout:${{ env.RELEASE_VERSION }}
platforms: |
linux/arm64
linux/amd64
build-args: |
CACHE_EXCHANGE_RATES_PERIOD=
DISABLE_READ_API=false
API_PATH=/
NETWORK_PATH=/
DISABLE_WEBAPP=false
DISABLE_WRITE_API=false
CACHE_ENABLE_TOTAL_GAS_USAGE_COUNTER=
WOBSERVER_ENABLED=false
ADMIN_PANEL_ENABLED=
CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL=
SOCKET_ROOT=
merge-master-after-release:
name: Merge 'master' to specific branch after release
runs-on: ubuntu-latest
env:
BRANCHES: |
production-core-stg
production-eth-stg
production-harmony-mainnet-shard-0-stg
production-lukso-stg
production-optimism-goerli-stg
production-optimism-bedrock-goerli-stg
production-optimism-mainnet-stg
production-optimism-stg
production-rsk-stg
production-sokol-stg
production-xdai-stg
steps:
- uses: actions/checkout@v2
- name: Set Git config
run: |
git config --local user.email "actions@github.com"
git config --local user.name "Github Actions"
- name: Merge master back after release
run: |
git fetch --unshallow
touch errors.txt
for branch in $BRANCHES;
do
git reset --merge
git checkout master
git fetch origin
echo $branch
git ls-remote --exit-code --heads origin $branch || { echo $branch >> errors.txt; continue; }
echo "Merge 'master' to $branch"
git checkout $branch
git pull || { echo $branch >> errors.txt; continue; }
git merge --no-ff master -m "Auto-merge master back to $branch" || { echo $branch >> errors.txt; continue; }
git push || { echo $branch >> errors.txt; continue; }
git checkout master;
done
[ -s errors.txt ] && echo "There are problems with merging 'master' to branches:" || echo "Errors file is empty"
cat errors.txt
[ ! -s errors.txt ]

57
.gitignore vendored

@ -0,0 +1,57 @@
# App artifacts
/_build
/apps/*/cover
/apps/*/logs
/cover
/db
/deps
/doc
/*.ez
/logs
# mix dialyzer artifacts
/priv/plts
# Generated on crash by the VM
erl_crash.dump
# Generated on crash by NPM
npm-debug.log
# Static artifacts
/apps/**/node_modules
# Since we are building assets from assets/,
# we ignore priv/static. You may want to comment
# this depending on your deployment strategy.
/apps/*/priv/static/
# Files matching config/*.secret.exs pattern contain sensitive
# data and you should not commit them into version control.
#
# Alternatively, you may comment the line below and commit the
# secrets files as long as you replace their contents by environment
# variables.
/apps/*/config/*.secret.exs
# Wallaby screenshots
screenshots/
# Sobelow
.sobelow
# osx
.DS_Store
# mix phx.gen.cert self-signed certs for dev
/apps/block_scout_web/priv/cert
/docker-compose/postgres-data
/docker-compose/redis-data
/docker-compose/tmp
/docker-compose/logs
.idea/
*.iml
.vscode

@ -0,0 +1,13 @@
pairs:
cj: CJ Bryan; cj
dr: Doc Ritezel; doc
mo: Matt Olenick; matto
db: Derek Barnes; dgb
rdwb: Desmond Bowe; des
email:
prefix: pair
domain: ministryofvelocity.com
no_solo_prefix: true
global: true

@ -0,0 +1,3 @@
elixir 1.14.1
erlang 25.1.1
nodejs 16.16.0

File diff suppressed because it is too large Load Diff

@ -0,0 +1,73 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance, race,
religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at andrew@poa.network. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org

@ -0,0 +1,62 @@
## Contributing
1. Fork it ( <https://github.com/blockscout/blockscout/fork> )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Write tests that cover your work
4. Commit your changes (`git commit -am 'Add some feature'`)
5. Push to the branch (`git push origin my-new-feature`)
6. Create a new Pull Request
7. Update CHANGELOG.md with the link to PR and description of the changes
### General
* Commits should be one logical change that still allows all tests to pass. Prefer smaller commits if there could be two levels of logic grouping. The goal is to allow contributors in the future (including your own future self) to determine your reasoning for making changes and to allow them to cherry-pick, patch or port those changes in isolation to other branches or forks.
* If during your PR you reveal a pre-existing bug:
1. Try to isolate the bug and fix it on an independent branch and PR it first.
2. Try to fix the bug in a separate commit from other changes:
1. Commit the code in the broken state that revealed the bug originally
2. Commit the fix for the bug.
3. Continue original PR work.
### Enhancements
Enhancements cover all changes that make users lives better:
* [feature requests filed as issues](https://github.com/blockscout/blockscout/labels/enhancement) that impact end-user [contributors](https://github.com/blockscout/blockscout/labels/contributor) and [developers](https://github.com/blockscout/blockscout/labels/developer)
* changes to the [architecture](https://github.com/blockscout/blockscout/labels/architecture) that make it easier for contributors (in the GitHub sense), dev-ops, and deployers to maintain and run blockscout
### Bug Fixes
For bug fixes, whenever possible, there should be at least 2 commits:
1. A regression test commit that contains tests that demonstrate the bug and show as failing.
2. The bug fix commit that shows the regression test now passing.
This format ensures that we can run the test to reproduce the original bug without depending on the new code in the fix, which could lead to the test falsely passing.
### Incompatible Changes
Incompatible changes can arise as a side-effect of either Enhancements or Bug Fixes. During Enhancements, incompatible changes can occur because, as an example, in order to support showing end-users new data, the database schema may need to be changed and the index rebuilt from scratch. During bug fixes, incompatible changes can occur because in order to fix a bug, the schema had to change, or how certain internal APIs are called changed.
* Incompatible changes should be called out explicitly, with any steps the various user roles need to do to upgrade.
* If a schema change occurs that requires a re-index add the following to the Pull Request description:
```markdown
**NOTE**: A database reset and re-index is required
```
### Pull Request
There is a [PULL_REQUEST_TEMPLATE.md](PULL_REQUEST_TEMPLATE.md) for this repository, but since it can't fill in the title for you, please follow the following steps when opening a Pull Request before filling in the template:
* [ ] Title
* [ ] Prefix labels if you don't have permissions to set labels in the GitHub interface.
* (bug) for [bug](https://github.com/blockscout/blockscout/labels/bug) fixes
* (enhancement) for [enhancement](https://github.com/blockscout/blockscout/labels/enhancement)s
* (incompatible changes) for [incompatible changes](https://github.com/blockscout/blockscout/labels/incompatible%20changes), such a refactor that removes functionality, changes arguments, or makes something required that wasn't previously.
* [ ] Single sentence summary of change
* What was fixed for bugs
* What was added for enhancements
* What was changed for incompatible changes
See [#255](https://github.com/blockscout/blockscout/pull/255) as an example PR that uses GitHub keywords and a Changelog to explain multiple changes.

@ -0,0 +1,22 @@
*Describe your issue here.*
### Environment
* Deployment type (Manual/Docker/Docker-compose):
* Elixir & Erlang/OTP versions (`elixir -version`):
* Node JS version (`node -v`):
* Operating System:
* Blockscout Version/branch/commit:
* Archive node type && version (Erigon/Geth/Nethermind/Ganache/?):
### Steps to reproduce
*Tell us how to reproduce this issue. ❤ if you can push up a branch to your fork with a regression test we can run to reproduce locally.*
### Expected behaviour
*Tell us what should happen.*
### Actual behaviour
*Tell us what happens instead.*

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

@ -0,0 +1,29 @@
*[GitHub keywords to close any associated issues](https://blog.github.com/2013-05-14-closing-issues-via-pull-requests/)*
## Motivation
*Why we should merge these changes. If using GitHub keywords to close [issues](https://github.com/poanetwork/blockscout/issues), this is optional as the motivation can be read on the issue page.*
## Changelog
### Enhancements
*Things you added that don't break anything. Regression tests for Bug Fixes count as Enhancements.*
### Bug Fixes
*Things you changed that fix bugs. If a fixes a bug, but in so doing adds a new requirement, removes code, or requires a database reset and reindex, the breaking part of the change should be added to Incompatible Changes below also.*
### Incompatible Changes
*Things you broke while doing Enhancements and Bug Fixes. Breaking changes include (1) adding new requirements and (2) removing code. Renaming counts as (2) because a rename is a removal followed by an add.*
## Upgrading
*If you have any Incompatible Changes in the above Changelog, outline how users of prior versions can upgrade once this PR lands or when reviewers are testing locally. A common upgrading step is "Database reset and re-index required".*
## Checklist for your Pull Request (PR)
- [ ] I added an entry to `CHANGELOG.md` with this PR
- [ ] If I added new functionality, I added tests covering it.
- [ ] If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
- [ ] I checked whether I should update the docs and did so by submitting a PR to https://github.com/blockscout/docs
- [ ] If I added/changed/removed ENV var, I submitted a PR to https://github.com/blockscout/docs to update the list of env vars at https://github.com/blockscout/docs/blob/master/for-developers/information-and-settings/env-variables.md and I updated the version to `master` in the Version column. Changes will be reflected in this table: https://docs.blockscout.com/for-developers/information-and-settings/env-variables.
- [ ] If I add new indices into DB, I checked, that they are not redundant with PGHero or other tools

@ -0,0 +1,52 @@
<h1 align="center">BlockScout</h1>
<p align="center">Blockchain Explorer for inspecting and analyzing EVM Chains.</p>
<div align="center">
[![Blockscout](https://github.com/blockscout/blockscout/workflows/Blockscout/badge.svg?branch=master)](https://github.com/blockscout/blockscout/actions)
[![](https://dcbadge.vercel.app/api/server/blockscout?style=flat)](https://discord.gg/blockscout)
</div>
BlockScout provides a comprehensive, easy-to-use interface for users to view, confirm, and inspect transactions on EVM (Ethereum Virtual Machine) blockchains. This includes the POA Network, Gnosis Chain, Ethereum Classic and other **Ethereum testnets, private networks and sidechains**.
See our [project documentation](https://docs.blockscout.com/) for detailed information and setup instructions.
For questions, comments and feature requests see the [discussions section](https://github.com/blockscout/blockscout/discussions).
## About BlockScout
BlockScout is an Elixir application that allows users to search transactions, view accounts and balances, and verify smart contracts on the Ethereum network including all forks and sidechains.
Currently available full-featured block explorers (Etherscan, Etherchain, Blockchair) are closed systems which are not independently verifiable. As Ethereum sidechains continue to proliferate in both private and public settings, transparent, open-source tools are needed to analyze and validate transactions.
## Supported Projects
BlockScout supports a number of projects. Hosted instances include POA Network, Gnosis Chain, Ethereum Classic, Sokol & Kovan testnets, and other EVM chains.
- [List of hosted mainnets, testnets, and additional chains using BlockScout](https://docs.blockscout.com/for-projects/supported-projects)
- [Hosted instance versions](https://docs.blockscout.com/about/use-cases/hosted-blockscout)
## Getting Started
See the [project documentation](https://docs.blockscout.com/) for instructions:
- [Requirements](https://docs.blockscout.com/for-developers/information-and-settings/requirements)
- [Ansible deployment](https://docs.blockscout.com/for-developers/ansible-deployment)
- [Manual deployment](https://docs.blockscout.com/for-developers/manual-deployment)
- [ENV variables](https://docs.blockscout.com/for-developers/information-and-settings/env-variables)
- [Configuration options](https://docs.blockscout.com/for-developers/configuration-options)
## Acknowledgements
We would like to thank the [EthPrize foundation](http://ethprize.io/) for their funding support.
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution and pull request protocol. We expect contributors to follow our [code of conduct](CODE_OF_CONDUCT.md) when submitting code or comments.
## License
[![License: GPL v3.0](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
This project is licensed under the GNU General Public License v3.0. See the [LICENSE](LICENSE) file for details.

@ -0,0 +1,12 @@
[
verbose: false,
private: true,
skip: true,
router: "lib/block_scout_web/router.ex",
exit: "low",
format: "compact",
ignore: ["Config.Headers", "Config.CSWH", "XSS.SendResp", "XSS.Raw"],
ignore_files: [
"apps/block_scout_web/lib/block_scout_web/views/tokens/instance/overview_view.ex"
]
]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,43 @@
# BlockScout Web
This is a tool for inspecting and analyzing the POA Network blockchain from a web browser.
## Machine Requirements
* Erlang/OTP 21+
* Elixir 1.9+
* Postgres 10.3
## Required Accounts
* Github for code storage
## Setup Instructions
### Development
To get BlockScout Web interface up and running locally:
* Setup `../explorer`
* Install Node.js dependencies with `$ cd assets && npm install && cd ..`
* Start Phoenix with `$ mix phx.server` (This can be run from this directory or the project root: the project root is recommended.)
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
You can also run IEx (Interactive Elixir): `$ iex -S mix phx.server` (This can be run from this directory or the project root: the project root is recommended.)
### Testing
* Build the assets: `cd assets && npm run build`
* Format the Elixir code: `mix format`
* Lint the Elixir code: `mix credo --strict`
* Run the dialyzer: `mix dialyzer --halt-exit-status`
* Check the Elixir code for vulnerabilities: `mix sobelow --config`
* Update translations templates and translations and check there are no uncommitted changes: `mix gettext.extract --merge`
* Lint the JavaScript code: `cd assets && npm run eslint`
## Internationalization
The app is currently internationalized. It is only localized to U.S. English.
To translate new strings, run `$ mix gettext.extract --merge` and edit the new strings in `priv/gettext/en/LC_MESSAGES/default.po`.

@ -0,0 +1,3 @@
{
"presets": [["@babel/preset-env", { "useBuiltIns": "usage", "corejs": { "version": 3 } }]]
}

@ -0,0 +1,6 @@
{
"extends": "standard",
"env": {
"browser": true
}
}

@ -0,0 +1,9 @@
# Javascript structure files
## lib
* This folder is used to place `component` files, that may span in multiple pages.
## pages
* This folder is used to place `page` specific files, that won't be reusable in other locations.

@ -0,0 +1,4 @@
export default {
primary: "#4786ff",
secondary: "#ced4da"
}

@ -0,0 +1,82 @@
/**
* @jest-environment jsdom
*/
import { asyncReducer, asyncInitialState } from '../../js/lib/async_listing_load'
describe('ELEMENTS_LOAD', () => {
test('sets only nextPagePath and ignores other keys', () => {
const state = Object.assign({}, asyncInitialState)
const action = { type: 'ELEMENTS_LOAD', nextPagePath: 'set', foo: 1 }
const output = asyncReducer(state, action)
expect(output.foo).not.toEqual(1)
expect(output.nextPagePath).toEqual('set')
})
})
describe('ADD_ITEM_KEY', () => {
test('sets itemKey to what was passed in the action', () => {
const expectedItemKey = 'expected.Key'
const state = Object.assign({}, asyncInitialState)
const action = { type: 'ADD_ITEM_KEY', itemKey: expectedItemKey }
const output = asyncReducer(state, action)
expect(output.itemKey).toEqual(expectedItemKey)
})
})
describe('START_REQUEST', () => {
test('sets loading status to true', () => {
const state = Object.assign({}, asyncInitialState, { loading: false })
const action = { type: 'START_REQUEST' }
const output = asyncReducer(state, action)
expect(output.loading).toEqual(true)
})
})
describe('REQUEST_ERROR', () => {
test('sets requestError to true', () => {
const state = Object.assign({}, asyncInitialState, { requestError: false })
const action = { type: 'REQUEST_ERROR' }
const output = asyncReducer(state, action)
expect(output.requestError).toEqual(true)
})
})
describe('FINISH_REQUEST', () => {
test('sets loading status to false', () => {
const state = Object.assign({}, asyncInitialState, {
loading: true
})
const action = { type: 'FINISH_REQUEST' }
const output = asyncReducer(state, action)
expect(output.loading).toEqual(false)
})
})
describe('ITEMS_FETCHED', () => {
test('sets the items to what was passed in the action', () => {
const expectedItems = [1, 2, 3]
const state = Object.assign({}, asyncInitialState)
const action = { type: 'ITEMS_FETCHED', items: expectedItems }
const output = asyncReducer(state, action)
expect(output.items).toEqual(expectedItems)
})
})
describe('NAVIGATE_TO_OLDER', () => {
test('sets beyondPageOne to true', () => {
const state = Object.assign({}, asyncInitialState, { beyondPageOne: false })
const action = { type: 'NAVIGATE_TO_OLDER' }
const output = asyncReducer(state, action)
expect(output.beyondPageOne).toEqual(true)
})
})

@ -0,0 +1,31 @@
/**
* @jest-environment jsdom
*/
import { searchEngine } from '../../js/lib/autocomplete'
test('searchEngine', () => {
expect(searchEngine('qwe', {
'name': 'Test',
'symbol': 'TST',
'address_hash': '0x000',
'tx_hash': '0x000',
'block_hash': '0x000'
})).toEqual(undefined)
expect(searchEngine('tes', {
'name': 'Test',
'symbol': 'TST',
'address_hash': '0x000',
'tx_hash': '0x000',
'block_hash': '0x000'
})).toEqual('<div><div>0x000</div><div><b><mark class=\'autoComplete_highlight\'>Tes</mark>t</b> (TST)</div></div>')
expect(searchEngine('qwe', {
'name': 'qwe1\'"><iframe/onload=console.log(123)>${7*7}{{7*7}}{{\'7\'*\'7\'}}',
'symbol': 'qwe1\'"><iframe/onload=console.log(123)>${7*7}{{7*7}}{{\'7\'*\'7\'}}',
'address_hash': '0x000',
'tx_hash': '0x000',
'block_hash': '0x000'
})).toEqual('<div><div>0x000</div><div><b><mark class=\'autoComplete_highlight\'>qwe</mark>1&#039;&quot;&gt;&lt;iframe/onload=console.log(123)&gt;${7*7}{{7*7}}{{&#039;7&#039;*&#039;7&#039;}}</b> (<mark class=\'autoComplete_highlight\'>qwe</mark>1&#039;&quot;&gt;&lt;iframe/onload=console.log(123)&gt;${7*7}{{7*7}}{{&#039;7&#039;*&#039;7&#039;}})</div></div>')
})

@ -0,0 +1,18 @@
/**
* @jest-environment jsdom
*/
import { formatUsdValue } from '../../js/lib/currency'
test('formatUsdValue', () => {
window.localized = {
'Less than': 'Less than'
}
expect(formatUsdValue(0)).toEqual('$0.00 USD')
expect(formatUsdValue(0.0000001)).toEqual('Less than $0.000001 USD')
expect(formatUsdValue(0.123456789)).toEqual('$0.123457 USD')
expect(formatUsdValue(0.1234)).toEqual('$0.123400 USD')
expect(formatUsdValue(1.23456789)).toEqual('$1.23 USD')
expect(formatUsdValue(1.2)).toEqual('$1.20 USD')
expect(formatUsdValue(123456.789)).toEqual('$123,457 USD')
})

@ -0,0 +1,285 @@
/**
* @jest-environment jsdom
*/
import { prepareMethodArgs } from '../../../js/lib/smart_contract/common_helpers'
import $ from 'jquery'
const oneFieldHTML =
'<form data-function-form>' +
' <input type="hidden" name="function_name" value="convertMultiple">' +
' <input type="hidden" name="method_id" value="">' +
' <div>' +
' <input type="text" name="function_input" id="first">' +
' </div>' +
' <input type="submit" value="Write">' +
'</form>'
const twoFieldHTML =
'<form data-function-form>' +
' <input type="hidden" name="function_name" value="convertMultiple">' +
' <input type="hidden" name="method_id" value="">' +
' <div>' +
' <input type="text" name="function_input" id="first">' +
' </div>' +
' <div>' +
' <input type="text" name="function_input" id="second">' +
' </div>' +
' <input type="submit" value="Write">' +
'</form>'
test('prepare contract args | type: address', () => {
document.body.innerHTML = oneFieldHTML
var inputs = [
{
"type": "address",
"name": "arg1",
"internalType": "address"
}
]
document.getElementById('first').value = ' 0x000000000000000000 0000000000000000000000 '
const expectedValue = ['0x0000000000000000000000000000000000000000']
const $functionInputs = $('[data-function-form]').find('input[name=function_input]')
expect(prepareMethodArgs($functionInputs, inputs)).toEqual(expectedValue)
})
test('prepare contract args | type: address[]*2', () => {
document.body.innerHTML = twoFieldHTML
var inputs = [
{
"type": "address[]",
"name": "arg1",
"internalType": "address[]"
},
{
"type": "address[]",
"name": "arg2",
"internalType": "address[]"
}
]
document.getElementById('first').value = ' 0x0000000000000000000000000000000000000000 , 0x0000000000000000000000000000000000000001 '
document.getElementById('second').value = ' 0x0000000000000000000000000000000000000002 , 0x0000000000000000000000000000000000000003 '
const expectedValue = [
[
'0x0000000000000000000000000000000000000000',
'0x0000000000000000000000000000000000000001'
],
[
'0x0000000000000000000000000000000000000002',
'0x0000000000000000000000000000000000000003'
]
]
const $functionInputs = $('[data-function-form]').find('input[name=function_input]')
expect(prepareMethodArgs($functionInputs, inputs)).toEqual(expectedValue)
})
test('prepare contract args | type: string', () => {
document.body.innerHTML = oneFieldHTML
var inputs = [
{
"type": "string",
"name": "arg1",
"internalType": "string"
}
]
document.getElementById('first').value = ' 0x0000000000000000000000000000000000000000 , 0x0000000000000000000000000000000000000001 '
const expectedValue = ['0x0000000000000000000000000000000000000000 , 0x0000000000000000000000000000000000000001']
const $functionInputs = $('[data-function-form]').find('input[name=function_input]')
expect(prepareMethodArgs($functionInputs, inputs)).toEqual(expectedValue)
})
test('prepare contract args | type: string[]', () => {
document.body.innerHTML = oneFieldHTML
var inputs = [
{
"type": "string[]",
"name": "arg1",
"internalType": "string[]"
}
]
document.getElementById('first').value = ' " 0x0000000000000000000000000000000000000000 " , " 0x0000000000000000000000000000000000000001 " '
const expectedValue = [['0x0000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000001']]
const $functionInputs = $('[data-function-form]').find('input[name=function_input]')
expect(prepareMethodArgs($functionInputs, inputs)).toEqual(expectedValue)
})
test('prepare contract args | type: bytes32', () => {
document.body.innerHTML = oneFieldHTML
var inputs = [
{
"type": "bytes32",
"name": "arg1",
"internalType": "bytes32"
}
]
document.getElementById('first').value = ' " 0x0000000000000000000000000000000000000000 " '
const expectedValue = ['0x0000000000000000000000000000000000000000']
const $functionInputs = $('[data-function-form]').find('input[name=function_input]')
expect(prepareMethodArgs($functionInputs, inputs)).toEqual(expectedValue)
})
test('prepare contract args | type: bytes32[]', () => {
document.body.innerHTML = oneFieldHTML
var inputs = [
{
"type": "bytes32[]",
"name": "arg1",
"internalType": "bytes32[]"
}
]
document.getElementById('first').value = ' " 0x0000000000000000000000000000000000000000 " , " 0x0000000000000000000000000000000000000001 " '
const expectedValue = [['0x0000000000000000000000000000000000000000','0x0000000000000000000000000000000000000001']]
const $functionInputs = $('[data-function-form]').find('input[name=function_input]')
expect(prepareMethodArgs($functionInputs, inputs)).toEqual(expectedValue)
})
test('prepare contract args | type: bool', () => {
document.body.innerHTML = oneFieldHTML
var inputs = [
{
"type": "bool",
"name": "arg1",
"internalType": "bool"
}
]
document.getElementById('first').value = ' fals e '
const expectedValue = [false]
const $functionInputs = $('[data-function-form]').find('input[name=function_input]')
expect(prepareMethodArgs($functionInputs, inputs)).toEqual(expectedValue)
})
test('prepare contract args | type: bool[]', () => {
document.body.innerHTML = oneFieldHTML
var inputs = [
{
"type": "bool[]",
"name": "arg1",
"internalType": "bool[]"
}
]
document.getElementById('first').value = ' true , false '
const expectedValue = [[true, false]]
const $functionInputs = $('[data-function-form]').find('input[name=function_input]')
expect(prepareMethodArgs($functionInputs, inputs)).toEqual(expectedValue)
})
test('prepare contract args | type: uint256', () => {
document.body.innerHTML = oneFieldHTML
var inputs = [
{
"type": "uint256",
"name": "arg1",
"internalType": "uint256"
}
]
document.getElementById('first').value = ' 9 876 543 210 '
const expectedValue = ['9876543210']
const $functionInputs = $('[data-function-form]').find('input[name=function_input]')
expect(prepareMethodArgs($functionInputs, inputs)).toEqual(expectedValue)
})
test('prepare contract args | type: uint256[]', () => {
document.body.innerHTML = oneFieldHTML
var inputs = [
{
"type": "uint256[]",
"name": "arg1",
"internalType": "uint256[]"
}
]
document.getElementById('first').value = ' 156 000 , 10 690 000 , 59874 '
const expectedValue = [['156000', '10690000', '59874']]
const $functionInputs = $('[data-function-form]').find('input[name=function_input]')
expect(prepareMethodArgs($functionInputs, inputs)).toEqual(expectedValue)
})
test('prepare contract args | type: tuple', () => {
document.body.innerHTML = oneFieldHTML
var inputs = [
{
"type": "tuple",
"name": "mintParams",
"internalType": "struct ISynthereumLiquidityPool.MintParams",
"components": [
{
"type": "uint256",
"name": "minNumTokens",
"internalType": "uint256"
},
{
"type": "uint256",
"name": "collateralAmount",
"internalType": "uint256"
},
{
"type": "uint256",
"name": "expiration",
"internalType": "uint256"
},
{
"type": "address",
"name": "recipient",
"internalType": "address"
}
]
}
]
document.getElementById('first').value = '[0, "200000000000000000000","1672938000" ,"0xc31249BA48763dF46388BA5C4E7565d62ed4801C"]'
const expectedValue = [["0","200000000000000000000","1672938000","0xc31249BA48763dF46388BA5C4E7565d62ed4801C"]]
const $functionInputs = $('[data-function-form]').find('input[name=function_input]')
expect(prepareMethodArgs($functionInputs, inputs)).toEqual(expectedValue)
})
test('prepare contract args | type: tuple[]', () => {
document.body.innerHTML = oneFieldHTML
var inputs = [
{
"type": "tuple[]",
"name": "mintParams",
"internalType": "struct ISynthereumLiquidityPool.MintParams",
"components": [
{
"type": "uint256",
"name": "minNumTokens",
"internalType": "uint256"
},
{
"type": "address",
"name": "recipient",
"internalType": "address"
}
]
}
]
document.getElementById('first').value = '[["200000000000000000000" ,"0xc31249BA48763dF46388BA5C4E7565d62ed4801C"], ["100500" , "0x9fbaD00ae18FAe064C728E6B535a6cB950c8C40A "]]'
const expectedValue = [[["200000000000000000000","0xc31249BA48763dF46388BA5C4E7565d62ed4801C"], ["100500","0x9fbaD00ae18FAe064C728E6B535a6cB950c8C40A"]]]
const $functionInputs = $('[data-function-form]').find('input[name=function_input]')
expect(prepareMethodArgs($functionInputs, inputs)).toEqual(expectedValue)
})

@ -0,0 +1,12 @@
/**
* @jest-environment jsdom
*/
import { escapeHtml } from '../../js/lib/utils'
test('escapeHtml', () => {
expect(escapeHtml('<script>')).toEqual('&lt;script&gt;')
expect(escapeHtml('1&')).toEqual('1&amp;')
expect(escapeHtml('1"')).toEqual('1&quot;')
expect(escapeHtml('1\'')).toEqual('1&#039;')
})

@ -0,0 +1,66 @@
/**
* @jest-environment jsdom
*/
import { reducer, initialState } from '../../js/pages/address'
describe('RECEIVED_NEW_BLOCK', () => {
test('increases validation count', () => {
const state = Object.assign({}, initialState, { validationCount: 30 })
const action = {
type: 'RECEIVED_NEW_BLOCK',
blockHtml: 'test 2'
}
const output = reducer(state, action)
expect(output.validationCount).toEqual(31)
})
test('when channel has been disconnected does not increase validation count', () => {
const state = Object.assign({}, initialState, {
channelDisconnected: true,
validationCount: 30
})
const action = {
type: 'RECEIVED_NEW_BLOCK',
blockHtml: 'test 2'
}
const output = reducer(state, action)
expect(output.validationCount).toEqual(30)
})
})
describe('RECEIVED_NEW_TRANSACTION', () => {
test('increment the transactions count', () => {
const state = Object.assign({}, initialState, {
addressHash: "0x001",
transactionCount: 1
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION',
msg: { fromAddressHash: "0x001", transactionHash: 2, transactionHtml: 'test 2' }
}
const newState = reducer(state, action)
expect(newState.transactionCount).toEqual(2)
})
test('does not increment the count if the channel is disconnected', () => {
const state = Object.assign({}, initialState, {
addressHash: "0x001",
transactionCount: 1,
channelDisconnected: true
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION',
msg: { fromAddressHash: "0x001", transactionHash: 2, transactionHtml: 'test 2' }
}
const newState = reducer(state, action)
expect(newState.transactionCount).toEqual(1)
})
})

@ -0,0 +1,151 @@
/**
* @jest-environment jsdom
*/
import { reducer, initialState } from '../../../js/pages/address/internal_transactions'
describe('RECEIVED_NEW_INTERNAL_TRANSACTION_BATCH', () => {
test('with new internal transaction', () => {
const state = Object.assign({}, initialState, {
items: ['test 1']
})
const action = {
type: 'RECEIVED_NEW_INTERNAL_TRANSACTION_BATCH',
msgs: [{ internalTransactionHtml: 'test 2' }]
}
const output = reducer(state, action)
expect(output.items).toEqual(['test 2', 'test 1'])
})
test('with batch of new internal transactions', () => {
const state = Object.assign({}, initialState, {
items: ['test 1']
})
const action = {
type: 'RECEIVED_NEW_INTERNAL_TRANSACTION_BATCH',
msgs: [
{ internalTransactionHtml: 'test 2' },
{ internalTransactionHtml: 'test 3' },
{ internalTransactionHtml: 'test 4' },
{ internalTransactionHtml: 'test 5' },
{ internalTransactionHtml: 'test 6' },
{ internalTransactionHtml: 'test 7' },
{ internalTransactionHtml: 'test 8' },
{ internalTransactionHtml: 'test 9' },
{ internalTransactionHtml: 'test 10' },
{ internalTransactionHtml: 'test 11' },
{ internalTransactionHtml: 'test 12' },
{ internalTransactionHtml: 'test 13' }
]
}
const output = reducer(state, action)
expect(output.items).toEqual(['test 1'])
expect(output.internalTransactionsBatch).toEqual([
'test 13',
'test 12',
'test 11',
'test 10',
'test 9',
'test 8',
'test 7',
'test 6',
'test 5',
'test 4',
'test 3',
'test 2',
])
})
test('after batch of new internal transactions', () => {
const state = Object.assign({}, initialState, {
internalTransactionsBatch: ['test 1']
})
const action = {
type: 'RECEIVED_NEW_INTERNAL_TRANSACTION_BATCH',
msgs: [
{ internalTransactionHtml: 'test 2' }
]
}
const output = reducer(state, action)
expect(output.internalTransactionsBatch).toEqual(['test 2', 'test 1'])
})
test('when channel has been disconnected', () => {
const state = Object.assign({}, initialState, {
channelDisconnected: true,
items: ['test 1']
})
const action = {
type: 'RECEIVED_NEW_INTERNAL_TRANSACTION_BATCH',
msgs: [{ internalTransactionHtml: 'test 2' }]
}
const output = reducer(state, action)
expect(output.items).toEqual(['test 1'])
})
test('beyond page one', () => {
const state = Object.assign({}, initialState, {
beyondPageOne: true,
items: ['test 1']
})
const action = {
type: 'RECEIVED_NEW_INTERNAL_TRANSACTION_BATCH',
msgs: [{ internalTransactionHtml: 'test 2' }]
}
const output = reducer(state, action)
expect(output.items).toEqual(['test 1'])
})
test('with filtered "to" internal transaction', () => {
const state = Object.assign({}, initialState, {
filter: 'to',
addressHash: '0x00',
items: []
})
const action = {
type: 'RECEIVED_NEW_INTERNAL_TRANSACTION_BATCH',
msgs: [{
fromAddressHash: '0x00',
toAddressHash: '0x01',
internalTransactionHtml: 'test 2'
},
{
fromAddressHash: '0x01',
toAddressHash: '0x00',
internalTransactionHtml: 'test 3'
}]
}
const output = reducer(state, action)
expect(output.items).toEqual(['test 3'])
})
test('with filtered "from" internal transaction', () => {
const state = Object.assign({}, initialState, {
filter: 'from',
addressHash: '0x00',
items: []
})
const action = {
type: 'RECEIVED_NEW_INTERNAL_TRANSACTION_BATCH',
msgs: [{
fromAddressHash: '0x00',
toAddressHash: '0x01',
internalTransactionHtml: 'test 2'
},
{
fromAddressHash: '0x01',
toAddressHash: '0x00',
internalTransactionHtml: 'test 3'
}]
}
const output = reducer(state, action)
expect(output.items).toEqual(['test 2'])
})
})

@ -0,0 +1,128 @@
/**
* @jest-environment jsdom
*/
import { reducer, initialState } from '../../../js/pages/address/transactions'
describe('RECEIVED_NEW_TRANSACTION', () => {
test('with new transaction', () => {
const state = Object.assign({}, initialState, {
items: ['transaction html']
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION',
msg: { transactionHtml: 'another transaction html' }
}
const output = reducer(state, action)
expect(output.items).toEqual([ 'another transaction html', 'transaction html' ])
})
test('when channel has been disconnected', () => {
const state = Object.assign({}, initialState, {
channelDisconnected: true,
items: ['transaction html']
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION',
msg: { transactionHtml: 'another transaction html' }
}
const output = reducer(state, action)
expect(output.items).toEqual(['transaction html'])
})
test('beyond page one', () => {
const state = Object.assign({}, initialState, {
beyondPageOne: true,
items: ['transaction html']
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION',
msg: { transactionHtml: 'another transaction html' }
}
const output = reducer(state, action)
expect(output.items).toEqual([ 'transaction html' ])
})
test('adds the new transaction to state even when it is filtered by to', () => {
const state = Object.assign({}, initialState, {
addressHash: '0x001',
filter: 'to',
items: []
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION',
msg: {
fromAddressHash: '0x002',
transactionHtml: 'transaction html',
toAddressHash: '0x001'
}
}
const output = reducer(state, action)
expect(output.items).toEqual(['transaction html'])
})
test(
'does nothing when it is filtered by to but the toAddressHash is different from addressHash',
() => {
const state = Object.assign({}, initialState, {
addressHash: '0x001',
filter: 'to',
items: []
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION',
msg: {
fromAddressHash: '0x003',
transactionHtml: 'transaction html',
toAddressHash: '0x002'
}
}
const output = reducer(state, action)
expect(output.items).toEqual([])
})
test('adds the new transaction to state even when it is filtered by from', () => {
const state = Object.assign({}, initialState, {
addressHash: '0x001',
filter: 'from',
items: []
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION',
msg: {
fromAddressHash: '0x001',
transactionHtml: 'transaction html',
toAddressHash: '0x002'
}
}
const output = reducer(state, action)
expect(output.items).toEqual(['transaction html'])
})
test(
'does nothing when it is filtered by from but the fromAddressHash is different from addressHash',
() => {
const state = Object.assign({}, initialState, {
addressHash: '0x001',
filter: 'to',
items: []
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION',
msg: {
addressHash: '0x001',
transactionHtml: 'transaction html',
fromAddressHash: '0x002'
}
}
const output = reducer(state, action)
expect(output.items).toEqual([])
})
})

@ -0,0 +1,50 @@
/**
* @jest-environment jsdom
*/
import { reducer, initialState } from '../../../js/pages/address/validations'
describe('RECEIVED_NEW_BLOCK', () => {
test('adds new block to the top of the list', () => {
const state = Object.assign({}, initialState, {
items: ['test 1']
})
const action = {
type: 'RECEIVED_NEW_BLOCK',
blockHtml: 'test 2'
}
const output = reducer(state, action)
expect(output.items).toEqual(['test 2', 'test 1'])
})
test('does nothing beyond page one', () => {
const state = Object.assign({}, initialState, {
beyondPageOne: true,
channelDisconnected: false,
items: ['test 1']
})
const action = {
type: 'RECEIVED_NEW_BLOCK',
blockHtml: 'test 2'
}
const output = reducer(state, action)
expect(output.items).toEqual(['test 1'])
})
test('does nothing when channel has been disconnected', () => {
const state = Object.assign({}, initialState, {
channelDisconnected: true,
items: ['test 1']
})
const action = {
type: 'RECEIVED_NEW_BLOCK',
blockHtml: 'test 2'
}
const output = reducer(state, action)
expect(output.items).toEqual(['test 1'])
})
})

@ -0,0 +1,156 @@
/**
* @jest-environment jsdom
*/
import { blockReducer as reducer, initialState, placeHolderBlock } from '../../js/pages/blocks'
test('CHANNEL_DISCONNECTED', () => {
const state = Object.assign({}, initialState, { items: [] })
const action = {
type: 'CHANNEL_DISCONNECTED'
}
const output = reducer(state, action)
expect(output.channelDisconnected).toBe(true)
})
describe('RECEIVED_NEW_BLOCK', () => {
test('receives new block', () => {
const state = Object.assign({}, initialState, { items: [], blockType: 'block' })
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
blockHtml: '<div data-block-number="1"></div>'
}
}
const output = reducer(state, action)
expect(output.items).toEqual(['<div data-block-number="1"></div>'])
})
test('ignores new block if not in first page', () => {
const state = Object.assign({}, initialState, { items: [], beyondPageOne: true })
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
blockHtml: '<div data-block-number="1"></div>'
}
}
const output = reducer(state, action)
expect(output.items).toEqual([])
})
test('ignores new block on uncles page', () => {
const state = Object.assign({}, initialState, { items: [], blockType: 'uncle' })
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
blockHtml: '<div data-block-number="1"></div>'
}
}
const output = reducer(state, action)
expect(output.items).toEqual([])
})
test('ignores new block on reorgs page', () => {
const state = Object.assign({}, initialState, { items: [], blockType: 'reorg' })
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
blockHtml: '<div data-block-number="1"></div>'
}
}
const output = reducer(state, action)
expect(output.items).toEqual([])
})
test('inserts place holders if block received out of order', () => {
window.localized = {}
const state = Object.assign({}, initialState, {
items: [
'<div data-block-number="2"></div>'
],
blockType: 'block'
})
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
blockHtml: '<div data-block-number="5"></div>'
}
}
const output = reducer(state, action)
expect(output.items).toEqual([
'<div data-block-number="5"></div>',
placeHolderBlock(4),
placeHolderBlock(3),
'<div data-block-number="2"></div>'
])
})
test('replaces duplicated block', () => {
const state = Object.assign({}, initialState, {
items: [
'<div data-block-number="5"></div>',
'<div data-block-number="4"></div>'
],
blockType: 'block'
})
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
blockHtml: '<div data-block-number="5" class="new"></div>',
}
}
const output = reducer(state, action)
expect(output.items).toEqual([
'<div data-block-number="5" class="new"></div>',
'<div data-block-number="4"></div>'
])
})
test('replaces duplicated block older than last one', () => {
const state = Object.assign({}, initialState, {
items: [
'<div data-block-number="5"></div>',
'<div data-block-number="4"></div>'
],
blockType: 'block'
})
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
blockHtml: '<div data-block-number="4" class="new"></div>',
}
}
const output = reducer(state, action)
expect(output.items).toEqual([
'<div data-block-number="5"></div>',
'<div data-block-number="4" class="new"></div>'
])
})
test('skips if new block height is lower than lowest on page', () => {
const state = Object.assign({}, initialState, {
items: [
'<div data-block-number="5"></div>',
'<div data-block-number="4"></div>',
'<div data-block-number="3"></div>',
'<div data-block-number="2"></div>'
],
blockType: 'block'
})
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
blockHtml: '<div data-block-number="1"></div>'
}
}
const output = reducer(state, action)
expect(output.items).toEqual([
'<div data-block-number="5"></div>',
'<div data-block-number="4"></div>',
'<div data-block-number="3"></div>',
'<div data-block-number="2"></div>'
])
})
})

@ -0,0 +1,419 @@
/**
* @jest-environment jsdom
*/
import { reducer, initialState, placeHolderBlock } from '../../js/pages/chain'
describe('ELEMENTS_LOAD', () => {
test('loads with skipped blocks', () => {
window.localized = {}
const state = initialState
const action = {
type: 'ELEMENTS_LOAD',
blocks: [
{ blockNumber: 6, chainBlockHtml: 'test 6' },
{ blockNumber: 3, chainBlockHtml: 'test 3' },
{ blockNumber: 2, chainBlockHtml: 'test 2' },
{ blockNumber: 1, chainBlockHtml: 'test 1' }
]
}
const output = reducer(state, action)
expect(output.blocks).toEqual([
{ blockNumber: 6, chainBlockHtml: 'test 6' },
{ blockNumber: 5, chainBlockHtml: placeHolderBlock(5) },
{ blockNumber: 4, chainBlockHtml: placeHolderBlock(4) },
{ blockNumber: 3, chainBlockHtml: 'test 3' }
])
})
})
test('RECEIVED_NEW_ADDRESS_COUNT', () => {
const state = Object.assign({}, initialState, {
addressCount: '1,000'
})
const action = {
type: 'RECEIVED_NEW_ADDRESS_COUNT',
msg: {
count: '1,000,000'
}
}
const output = reducer(state, action)
expect(output.addressCount).toEqual('1,000,000')
})
describe('RECEIVED_NEW_BLOCK', () => {
test('receives new block', () => {
const state = Object.assign({}, initialState, {
averageBlockTime: '6 seconds',
blocks: [
{ blockNumber: 1, chainBlockHtml: 'test 1' },
{ blockNumber: 0, chainBlockHtml: 'test 0' }
]
})
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
averageBlockTime: '5 seconds',
blockNumber: 2,
chainBlockHtml: 'new block'
}
}
const output = reducer(state, action)
expect(output.averageBlockTime).toEqual('5 seconds')
expect(output.blocks).toEqual([
{ blockNumber: 2, chainBlockHtml: 'new block', averageBlockTime: '5 seconds' },
{ blockNumber: 1, chainBlockHtml: 'test 1' },
{ blockNumber: 0, chainBlockHtml: 'test 0' }
])
})
test('receives new block if >= 4 blocks', () => {
const state = Object.assign({}, initialState, {
averageBlockTime: '6 seconds',
blocks: [
{ blockNumber: 3, chainBlockHtml: 'test 3' },
{ blockNumber: 2, chainBlockHtml: 'test 2' },
{ blockNumber: 1, chainBlockHtml: 'test 1' },
{ blockNumber: 0, chainBlockHtml: 'test 0' }
]
})
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
averageBlockTime: '5 seconds',
blockNumber: 4,
chainBlockHtml: 'new block'
}
}
const output = reducer(state, action)
expect(output.averageBlockTime).toEqual('5 seconds')
expect(output.blocks).toEqual([
{ blockNumber: 4, chainBlockHtml: 'new block', averageBlockTime: '5 seconds' },
{ blockNumber: 3, chainBlockHtml: 'test 3' },
{ blockNumber: 2, chainBlockHtml: 'test 2' },
{ blockNumber: 1, chainBlockHtml: 'test 1' }
])
})
test('inserts place holders if block received out of order', () => {
window.localized = {}
const state = Object.assign({}, initialState, {
blocks: [
{ blockNumber: 3, chainBlockHtml: 'test 3' },
{ blockNumber: 2, chainBlockHtml: 'test 2' },
{ blockNumber: 1, chainBlockHtml: 'test 1' },
{ blockNumber: 0, chainBlockHtml: 'test 0' }
]
})
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
chainBlockHtml: 'test 6',
blockNumber: 6
}
}
const output = reducer(state, action)
expect(output.blocks).toEqual([
{ blockNumber: 6, chainBlockHtml: 'test 6' },
{ blockNumber: 5, chainBlockHtml: placeHolderBlock(5) },
{ blockNumber: 4, chainBlockHtml: placeHolderBlock(4) },
{ blockNumber: 3, chainBlockHtml: 'test 3' }
])
})
test('replaces duplicated block', () => {
const state = Object.assign({}, initialState, {
blocks: [
{ blockNumber: 5, chainBlockHtml: 'test 5' },
{ blockNumber: 4, chainBlockHtml: 'test 4' }
]
})
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
chainBlockHtml: 'test5',
blockNumber: 5
}
}
const output = reducer(state, action)
expect(output.blocks).toEqual([
{ blockNumber: 5, chainBlockHtml: 'test5' },
{ blockNumber: 4, chainBlockHtml: 'test 4' }
])
})
test('skips if new block height is lower than lowest on page', () => {
window.localized = {}
const state = Object.assign({}, initialState, {
averageBlockTime: '5 seconds',
blocks: [
{ blockNumber: 5, chainBlockHtml: 'test 5' },
{ blockNumber: 4, chainBlockHtml: 'test 4' },
{ blockNumber: 3, chainBlockHtml: 'test 3' },
{ blockNumber: 2, chainBlockHtml: 'test 2' }
]
})
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
averageBlockTime: '9 seconds',
blockNumber: 1,
chainBlockHtml: 'test 1'
}
}
const output = reducer(state, action)
expect(output.averageBlockTime).toEqual('5 seconds')
expect(output.blocks).toEqual([
{ blockNumber: 5, chainBlockHtml: 'test 5' },
{ blockNumber: 4, chainBlockHtml: 'test 4' },
{ blockNumber: 3, chainBlockHtml: 'test 3' },
{ blockNumber: 2, chainBlockHtml: 'test 2' }
])
})
test('only tracks 4 blocks based on page display limit', () => {
const state = Object.assign({}, initialState, {
blocks: [
{ blockNumber: 5, chainBlockHtml: 'test 5' },
{ blockNumber: 4, chainBlockHtml: 'test 4' },
{ blockNumber: 3, chainBlockHtml: 'test 3' },
{ blockNumber: 2, chainBlockHtml: 'test 2' }
]
})
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
chainBlockHtml: 'test 6',
blockNumber: 6
}
}
const output = reducer(state, action)
expect(output.blocks).toEqual([
{ blockNumber: 6, chainBlockHtml: 'test 6' },
{ blockNumber: 5, chainBlockHtml: 'test 5' },
{ blockNumber: 4, chainBlockHtml: 'test 4' },
{ blockNumber: 3, chainBlockHtml: 'test 3' }
])
})
test('skipped blocks list replaced when another block comes in with +3 blockheight', () => {
window.localized = {}
const state = Object.assign({}, initialState, {
blocks: [
{ blockNumber: 5, chainBlockHtml: 'test 5' },
{ blockNumber: 4, chainBlockHtml: 'test 4' },
{ blockNumber: 3, chainBlockHtml: 'test 3' },
{ blockNumber: 2, chainBlockHtml: 'test 2' }
]
})
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
blockNumber: 10,
chainBlockHtml: 'test 10'
}
}
const output = reducer(state, action)
expect(output.blocks).toEqual([
{ blockNumber: 10, chainBlockHtml: 'test 10' },
{ blockNumber: 9, chainBlockHtml: placeHolderBlock(9) },
{ blockNumber: 8, chainBlockHtml: placeHolderBlock(8) },
{ blockNumber: 7, chainBlockHtml: placeHolderBlock(7) }
])
})
})
test('RECEIVED_NEW_EXCHANGE_RATE', () => {
const state = initialState
const action = {
type: 'RECEIVED_NEW_EXCHANGE_RATE',
msg: {
exchangeRate: {
availableSupply: 1000000,
marketCapUsd: 1230000
},
marketHistoryData: { data: 'some stuff' }
}
}
const output = reducer(state, action)
expect(output.availableSupply).toEqual(1000000)
expect(output.marketHistoryData).toEqual({ data: 'some stuff' })
expect(output.usdMarketCap).toEqual(1230000)
})
describe('RECEIVED_NEW_TRANSACTION_BATCH', () => {
test('single transaction with no loading or errors', () => {
const state = Object.assign(initialState, { transactionsLoading: false, transactionError: false } )
const action = {
type: 'RECEIVED_NEW_TRANSACTION_BATCH',
msgs: [{
transactionHtml: 'test'
}]
}
const output = reducer(state, action)
expect(output.transactions).toEqual([{ transactionHtml: 'test' }])
expect(output.transactionsBatch.length).toEqual(0)
expect(output.transactionCount).toEqual(1)
})
test('single transaction with error loading first transactions', () => {
const state = Object.assign({}, initialState, { transactionsError: true } )
const action = {
type: 'RECEIVED_NEW_TRANSACTION_BATCH',
msgs: [{
transactionHtml: 'test'
}]
}
const output = reducer(state, action)
expect(output.transactions).toEqual([])
expect(output.transactionsBatch.length).toEqual(0)
expect(output.transactionCount).toEqual(1)
})
test('single transaction while loading', () => {
const state = Object.assign({}, initialState, { transactionsLoading: true } )
const action = {
type: 'RECEIVED_NEW_TRANSACTION_BATCH',
msgs: [{
transactionHtml: 'test'
}]
}
const output = reducer(state, action)
expect(output.transactions).toEqual([])
expect(output.transactionsBatch.length).toEqual(0)
expect(output.transactionCount).toEqual(1)
})
test('large batch of transactions', () => {
const state = initialState
const action = {
type: 'RECEIVED_NEW_TRANSACTION_BATCH',
msgs: [{
transactionHtml: 'test 1'
},{
transactionHtml: 'test 2'
},{
transactionHtml: 'test 3'
},{
transactionHtml: 'test 4'
},{
transactionHtml: 'test 5'
},{
transactionHtml: 'test 6'
},{
transactionHtml: 'test 7'
},{
transactionHtml: 'test 8'
},{
transactionHtml: 'test 9'
},{
transactionHtml: 'test 10'
},{
transactionHtml: 'test 11'
}]
}
const output = reducer(state, action)
expect(output.transactions).toEqual([])
expect(output.transactionsBatch.length).toEqual(11)
expect(output.transactionCount).toEqual(11)
})
test('maintains list size', () => {
const state = Object.assign({}, initialState, {
transactions: [
{ transactionHash: '0x4', transactionHtml: 'test 4' },
{ transactionHash: '0x3', transactionHtml: 'test 3' },
{ transactionHash: '0x2', transactionHtml: 'test 2' },
{ transactionHash: '0x1', transactionHtml: 'test 1' }
]
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION_BATCH',
msgs: [
{ transactionHash: '0x5', transactionHtml: 'test 5' },
{ transactionHash: '0x6', transactionHtml: 'test 6' }
]
}
const output = reducer(state, action)
expect(output.transactions).toEqual([
{ transactionHash: '0x6', transactionHtml: 'test 6' },
{ transactionHash: '0x5', transactionHtml: 'test 5' },
{ transactionHash: '0x4', transactionHtml: 'test 4' },
{ transactionHash: '0x3', transactionHtml: 'test 3' },
])
expect(output.transactionsBatch.length).toEqual(0)
})
test('single transaction after large batch of transactions', () => {
const state = Object.assign({}, initialState, {
transactionsBatch: [6,7,8,9,10,11,12,13,14,15,16],
transactions: [1,2,3,4,5]
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION_BATCH',
msgs: [{
transactionHtml: 'test 12'
}]
}
const output = reducer(state, action)
expect(output.transactions).toEqual([1,2,3,4,5])
expect(output.transactionsBatch.length).toEqual(12)
})
test('large batch of transactions after large batch of transactions', () => {
const state = Object.assign({}, initialState, {
transactionsBatch: [1,2,3,4,5,6,7,8,9,10,11]
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION_BATCH',
msgs: [{
transactionHtml: 'test 12'
},{
transactionHtml: 'test 13'
},{
transactionHtml: 'test 14'
},{
transactionHtml: 'test 15'
},{
transactionHtml: 'test 16'
},{
transactionHtml: 'test 17'
},{
transactionHtml: 'test 18'
},{
transactionHtml: 'test 19'
},{
transactionHtml: 'test 20'
},{
transactionHtml: 'test 21'
},{
transactionHtml: 'test 22'
}]
}
const output = reducer(state, action)
expect(output.transactions).toEqual([])
expect(output.transactionsBatch.length).toEqual(22)
})
test('after disconnection', () => {
const state = Object.assign({}, initialState, {
channelDisconnected: true
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION_BATCH',
msgs: [{
transactionHtml: 'test'
}]
}
const output = reducer(state, action)
expect(output.transactions).toEqual([])
expect(output.transactionsBatch.length).toEqual(0)
})
})

@ -0,0 +1,212 @@
/**
* @jest-environment jsdom
*/
import { reducer, initialState } from '../../js/pages/pending_transactions'
test('CHANNEL_DISCONNECTED', () => {
const state = initialState
const action = {
type: 'CHANNEL_DISCONNECTED'
}
const output = reducer(state, action)
expect(output.channelDisconnected).toBe(true)
})
describe('RECEIVED_NEW_PENDING_TRANSACTION_BATCH', () => {
test('single transaction', () => {
const state = Object.assign({}, initialState, {items:[]})
const action = {
type: 'RECEIVED_NEW_PENDING_TRANSACTION_BATCH',
msgs: [{
transactionHash: '0x00',
transactionHtml: 'test'
}]
}
const output = reducer(state, action)
expect(output.items).toEqual(['test'])
expect(output.pendingTransactionsBatch.length).toEqual(0)
expect(output.pendingTransactionCount).toEqual(1)
})
test('large batch of transactions', () => {
const state = Object.assign({}, initialState, {items:[]})
const action = {
type: 'RECEIVED_NEW_PENDING_TRANSACTION_BATCH',
msgs: [{
transactionHash: '0x01',
transactionHtml: 'test 1'
},{
transactionHash: '0x02',
transactionHtml: 'test 2'
},{
transactionHash: '0x03',
transactionHtml: 'test 3'
},{
transactionHash: '0x04',
transactionHtml: 'test 4'
},{
transactionHash: '0x05',
transactionHtml: 'test 5'
},{
transactionHash: '0x06',
transactionHtml: 'test 6'
},{
transactionHash: '0x07',
transactionHtml: 'test 7'
},{
transactionHash: '0x08',
transactionHtml: 'test 8'
},{
transactionHash: '0x09',
transactionHtml: 'test 9'
},{
transactionHash: '0x10',
transactionHtml: 'test 10'
},{
transactionHash: '0x11',
transactionHtml: 'test 11'
}]
}
const output = reducer(state, action)
expect(output.items).toEqual([])
expect(output.pendingTransactionsBatch.length).toEqual(11)
expect(output.pendingTransactionCount).toEqual(11)
})
test('single transaction after single transaction', () => {
const state = Object.assign({}, initialState, {
items: ['test 0x01'],
pendingTransactionCount: 1
})
const action = {
type: 'RECEIVED_NEW_PENDING_TRANSACTION_BATCH',
msgs: [{
transactionHash: '0x02',
transactionHtml: 'test 0x02'
}]
}
const output = reducer(state, action)
expect(output.items).toEqual(['test 0x02', 'test 0x01'])
expect(output.pendingTransactionsBatch.length).toEqual(0)
expect(output.pendingTransactionCount).toEqual(2)
})
test('single transaction after large batch of transactions', () => {
const state = Object.assign({}, initialState, {
pendingTransactionsBatch: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'],
items: []
})
const action = {
type: 'RECEIVED_NEW_PENDING_TRANSACTION_BATCH',
msgs: [{
transactionHash: '0x12',
transactionHtml: 'test 12'
}]
}
const output = reducer(state, action)
expect(output.items).toEqual([])
expect(output.pendingTransactionsBatch.length).toEqual(12)
})
test('large batch of transactions after large batch of transactions', () => {
const state = Object.assign({}, initialState, {
pendingTransactionsBatch: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'],
items: []
})
const action = {
type: 'RECEIVED_NEW_PENDING_TRANSACTION_BATCH',
msgs: [{
transactionHash: '0x12',
transactionHtml: 'test 12'
},{
transactionHash: '0x13',
transactionHtml: 'test 13'
},{
transactionHash: '0x14',
transactionHtml: 'test 14'
},{
transactionHash: '0x15',
transactionHtml: 'test 15'
},{
transactionHash: '0x16',
transactionHtml: 'test 16'
},{
transactionHash: '0x17',
transactionHtml: 'test 17'
},{
transactionHash: '0x18',
transactionHtml: 'test 18'
},{
transactionHash: '0x19',
transactionHtml: 'test 19'
},{
transactionHash: '0x20',
transactionHtml: 'test 20'
},{
transactionHash: '0x21',
transactionHtml: 'test 21'
},{
transactionHash: '0x22',
transactionHtml: 'test 22'
}]
}
const output = reducer(state, action)
expect(output.items).toEqual([])
expect(output.pendingTransactionsBatch.length).toEqual(22)
})
test('after disconnection', () => {
const state = Object.assign({}, initialState, {
channelDisconnected: true,
items: []
})
const action = {
type: 'RECEIVED_NEW_PENDING_TRANSACTION_BATCH',
msgs: [{
transactionHash: '0x00',
transactionHtml: 'test'
}]
}
const output = reducer(state, action)
expect(output.items).toEqual([])
})
})
describe('RECEIVED_NEW_TRANSACTION', () => {
test('single transaction collated', () => {
const state = Object.assign({}, initialState, {
pendingTransactionCount: 2,
items: ['old 0x00']
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION',
msg: {
transactionHash: '0x00',
transactionHtml: 'new 0x00'
}
}
const output = reducer(state, action)
expect(output.pendingTransactionCount).toBe(1)
expect(output.items).toEqual(['new 0x00'])
})
test('single transaction collated after batch', () => {
const state = Object.assign({}, initialState, {
pendingTransactionsBatch: ['0x01', '0x02', '0x03', '0x04', '0x05', '0x06', '0x07', '0x08', '0x09', '0x0a', '0x0b'],
items: []
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION',
msg: {
transactionHash: '0x01'
}
}
const output = reducer(state, action)
expect(output.pendingTransactionsBatch.length).toEqual(10)
expect(output.pendingTransactionsBatch).not.toContain('0x01')
})
})

@ -0,0 +1,18 @@
/**
* @jest-environment jsdom
*/
import { reducer, initialState } from '../../js/pages/transaction'
test('RECEIVED_NEW_BLOCK', () => {
const state = { ...initialState, blockNumber: 1 }
const action = {
type: 'RECEIVED_NEW_BLOCK',
msg: {
blockNumber: 5
}
}
const output = reducer(state, action)
expect(output.confirmations).toBe(4)
})

@ -0,0 +1,133 @@
/**
* @jest-environment jsdom
*/
import { reducer, initialState } from '../../js/pages/transactions'
test('CHANNEL_DISCONNECTED', () => {
const state = initialState
const action = {
type: 'CHANNEL_DISCONNECTED'
}
const output = reducer(state, action)
expect(output.channelDisconnected).toBe(true)
expect(output.transactionsBatch.length).toBe(0)
})
describe('RECEIVED_NEW_TRANSACTION_BATCH', () => {
test('single transaction', () => {
const state = Object.assign({}, initialState, { items: [] })
const action = {
type: 'RECEIVED_NEW_TRANSACTION_BATCH',
msgs: [{
transactionHtml: 'transaction_html'
}]
}
const output = reducer(state, action)
expect(output.items).toEqual(['transaction_html'])
expect(output.transactionsBatch.length).toEqual(0)
expect(output.transactionCount).toEqual(1)
})
test('large batch of transactions', () => {
const state = Object.assign({}, initialState, { items: [] })
const action = {
type: 'RECEIVED_NEW_TRANSACTION_BATCH',
msgs: [
{ transactionHtml: 'transaction_html_1' },
{ transactionHtml: 'transaction_html_2' },
{ transactionHtml: 'transaction_html_3' },
{ transactionHtml: 'transaction_html_4' },
{ transactionHtml: 'transaction_html_5' },
{ transactionHtml: 'transaction_html_6' },
{ transactionHtml: 'transaction_html_7' },
{ transactionHtml: 'transaction_html_8' },
{ transactionHtml: 'transaction_html_9' },
{ transactionHtml: 'transaction_html_10' },
{ transactionHtml: 'transaction_html_11' },
]
}
const output = reducer(state, action)
expect(output.items).toEqual([])
expect(output.transactionsBatch.length).toEqual(11)
expect(output.transactionCount).toEqual(11)
})
test('single transaction after single transaction', () => {
const state = Object.assign({}, initialState, { items: [ 'transaction_html' ] })
const action = {
type: 'RECEIVED_NEW_TRANSACTION_BATCH',
msgs: [{
transactionHtml: 'another_transaction_html'
}]
}
const output = reducer(state, action)
expect(output.items).toEqual([ 'another_transaction_html', 'transaction_html' ])
expect(output.transactionsBatch.length).toEqual(0)
})
test('single transaction after large batch of transactions', () => {
const state = Object.assign({}, initialState, {
items: [],
transactionsBatch: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION_BATCH',
msgs: [{
transactionHtml: 'test 12'
}]
}
const output = reducer(state, action)
expect(output.items).toEqual([])
expect(output.transactionsBatch.length).toEqual(12)
})
test('large batch of transactions after large batch of transactions', () => {
const state = Object.assign({}, initialState, {
items: [],
transactionsBatch: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION_BATCH',
msgs: [
{ transactionHtml: 'transaction_html_12' },
{ transactionHtml: 'transaction_html_13' },
{ transactionHtml: 'transaction_html_14' },
{ transactionHtml: 'transaction_html_15' },
{ transactionHtml: 'transaction_html_16' },
{ transactionHtml: 'transaction_html_17' },
{ transactionHtml: 'transaction_html_18' },
{ transactionHtml: 'transaction_html_19' },
{ transactionHtml: 'transaction_html_20' },
{ transactionHtml: 'transaction_html_21' },
{ transactionHtml: 'transaction_html_22' }
]
}
const output = reducer(state, action)
expect(output.items).toEqual([])
expect(output.transactionsBatch.length).toEqual(22)
})
test('after disconnection', () => {
const state = Object.assign({}, initialState, {
items: [],
channelDisconnected: true
})
const action = {
type: 'RECEIVED_NEW_TRANSACTION_BATCH',
msgs: [{
transactionHtml: 'transaction_html'
}]
}
const output = reducer(state, action)
expect(output.items).toEqual([])
expect(output.transactionsBatch.length).toEqual(0)
})
})

@ -0,0 +1,4 @@
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 47.971 47.971" style="enable-background:new 0 0 47.971 47.971;" xml:space="preserve"><g><g>
<path d="M28.228,23.986L47.092,5.122c1.172-1.171,1.172-3.071,0-4.242c-1.172-1.172-3.07-1.172-4.242,0L23.986,19.744L5.121,0.88 c-1.172-1.172-3.07-1.172-4.242,0c-1.172,1.171-1.172,3.071,0,4.242l18.865,18.864L0.879,42.85c-1.172,1.171-1.172,3.071,0,4.242 C1.465,47.677,2.233,47.97,3,47.97s1.535-0.293,2.121-0.879l18.865-18.864L42.85,47.091c0.586,0.586,1.354,0.879,2.121,0.879 s1.535-0.293,2.121-0.879c1.172-1.171,1.172-3.071,0-4.242L28.228,23.986z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#828BA0"/>
</g></g> </svg>

After

Width:  |  Height:  |  Size: 806 B

@ -0,0 +1,46 @@
@use 'sass:math';
pre {
white-space: pre-wrap;
}
.pre-wrap code {
white-space: pre-wrap;
}
.pre-decompiled code {
white-space: pre-wrap;
counter-increment: line;
}
.pre-decompiled code::before {
content: counter(line);
display: inline-block;
width: 3em;
border-right: 1px solid #ddd;
padding: 0 .5em;
margin-right: .5em;
color: #888;
-webkit-user-select: none;
}
.pre-scrollable-shorty {
max-height: math.div($pre-scrollable-max-height, 7);
}
.tile pre {
margin-bottom: 0;
}
.contract-code-container {
@include media-breakpoint-down(md) {
flex-direction: column;
}
& .buttons {
@include media-breakpoint-down(md) {
width: 100%;
margin-bottom: 10px;
}
}
}

@ -0,0 +1,29 @@
hr {
border-bottom: none;
border-left: none;
border-right: none;
border-top: 1px solid #f5f6fa;
margin: 30px 0;
}
svg {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
display: inline-block;
font-style: normal;
font-variant: normal;
text-rendering: auto;
line-height: 1;
}
dl {
margin-bottom: 12px;
&:last-child {
margin-bottom: 0;
}
dd {
margin: 0;
}
}

@ -0,0 +1,54 @@
.pr-0-md {
padding-right: 0 !important;
@include media-breakpoint-down(md) {
padding-right: 15px !important;
}
}
.pl-0-md {
padding-left: 0 !important;
@include media-breakpoint-down(md) {
padding-left: 15px !important;
}
}
.card-mr-50-md {
margin-right: $common-container-margin;
@include media-breakpoint-down(md) {
margin-right: 0;
}
}
.clearfix:after {
clear: both;
content: " "; /* Older browser do not support empty content */
display: block;
height: 0;
visibility: hidden;
}
.hidden {
display: none!important;
}
.word-break-all {
word-break: break-all;
}
.centered-container {
display: flex;
align-items: center;
}
.pre-wrap {
white-space: pre-wrap;
}
.mb-2-desktop {
@include media-breakpoint-up(sm) {
margin-bottom: .5rem !important;
}
}

@ -0,0 +1,16 @@
@import '~@tarekraafat/autocomplete.js/dist/css/autoComplete.01.css';
.layout-container {
display: flex;
flex-direction: column;
min-height: 100vh;
main {
flex-grow: 1;
background-color: #fbfafc;
}
}
.logs-hash {
line-height: 24px !important;
}

@ -0,0 +1,253 @@
@mixin textfield-placeholder($color: #a3a9b5) {
&::-webkit-input-placeholder {
color: $color;
}
&::-moz-placeholder {
color: $color;
}
&:-ms-input-placeholder {
color: $color;
}
&:-moz-placeholder {
color: $color;
}
}
@mixin gradient-container() {
background-color: $primary;
background-image: linear-gradient(
to right,
$dashboard-banner-gradient-start,
$dashboard-banner-gradient-end
);
box-shadow: 0 5px 40px -5px rgba(#000, 0.25);
margin-top: -3rem;
}
@mixin stats-item($border-color: #fff, $text-color: #fff, $value-color: #fff) {
&-item {
display: flex;
flex-direction: column;
justify-content: center;
padding-left: calc(1rem + 4px);
padding-right: 1rem;
position: relative;
&::before {
background-color: $border-color;
border-radius: 2px;
content: "";
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 4px;
}
}
&-label {
color: $text-color;
display: block;
white-space: nowrap;
}
&-label-item {
margin-right: 20px;
&:last-child {
margin-right: 0;
}
}
&-value {
color: $value-color;
display: block;
font-size: 1.5rem;
font-weight: 200;
white-space: nowrap;
@media (max-width: $breakpoint-lg) {
font-size: 1.25rem;
}
}
}
@mixin btn-full($bg-color: $primary, $text-color: #fff) {
-webkit-appearance: none !important;
align-items: center;
background-color: $bg-color;
border-radius: 2px;
border: 1px solid $bg-color;
color: $text-color;
cursor: pointer;
display: flex;
font-size: 12px;
font-weight: 600;
height: 36px;
justify-content: center;
outline: none;
padding: 0 15px;
text-decoration: none;
transition: $transition-cont;
white-space: nowrap;
width: fit-content;
&:hover {
background-color: darken($bg-color, 10%);
border-color: darken($bg-color, 10%);
color: $text-color;
text-decoration: none;
}
svg {
margin-right: 12px;
}
path {
fill: $text-color;
}
&.full-width {
width: 100%;
}
&[disabled] {
&,
&:hover {
background-color: $bg-color;
border-color: $bg-color;
cursor: default;
opacity: 0.5;
}
}
&.m-b-0-7 {
margin-bottom: 0.7rem;
}
}
@mixin btn-line($bg-color: #fff, $text-color: $secondary, $font-size: 12px) {
-webkit-appearance: none !important;
align-items: center;
background-color: $bg-color;
border-radius: 2px;
border: 1px solid $text-color;
color: $text-color;
cursor: pointer;
display: flex;
font-size: $font-size;
font-weight: 600;
height: 36px;
justify-content: center;
outline: none;
padding: 0 15px;
text-decoration: none;
transition: $transition-cont;
white-space: nowrap;
width: fit-content;
font-weight: 400;
&:hover {
background-color: $text-color;
color: $bg-color;
text-decoration: none;
path {
fill: $bg-color;
}
}
svg {
margin-right: 12px;
}
path {
transition: $transition-cont;
fill: $text-color;
}
&.full-width {
width: 100%;
}
&[disabled] {
&,
&:hover {
background-color: $bg-color!important;
border-color: $primary!important;
color: $primary!important;
cursor: default;
opacity: 0.5;
}
}
}
@mixin square-icon-button($color, $dimensions) {
align-items: center;
border: 1px solid $color;
border-radius: 2px;
cursor: pointer;
display: flex;
height: $dimensions;
justify-content: center;
transition: $transition-cont;
width: $dimensions;
svg {
display: block;
height: 100%;
width: 100%;
}
path {
fill: $color;
transition: $transition-cont;
}
&:hover {
background-color: $color;
path {
fill: #fff;
}
}
}
@mixin square-icon-button-inline($color, $dimensions) {
border: 1px solid $color;
border-radius: 2px;
cursor: pointer;
display: inline;
height: $dimensions;
transition: $transition-cont;
width: $dimensions;
path {
fill: $color;
transition: $transition-cont;
}
svg {
vertical-align: text-bottom;
margin-bottom: -1.1px;
}
&:hover {
background-color: $color;
path {
fill: #fff;
}
}
}
@mixin image-2x($image, $width: 100%, $height: 100%) {
@media (min--moz-device-pixel-ratio: 1.3),
(-o-min-device-pixel-ratio: 2.6/2),
(-webkit-min-device-pixel-ratio: 1.3),
(min-device-pixel-ratio: 1.3),
(min-resolution: 1.3dppx) {
background-image: url($image);
background-size: $width $height;
}
}

@ -0,0 +1,130 @@
$common-link-color: $primary !default;
$blue: #4b89fb !default;
$success: #34c0ad !default;
body {
font-family: $font-family;
font-size: 12px;
}
h1 {
font-size: 26px;
font-weight: 200;
}
h2 {
font-size: 18px;
font-weight: 200;
}
h3 {
font-size: 14px;
font-weight: 600;
line-height: 36px;
}
h4 {
color: $gray-600;
font-size: 16px;
font-weight: 300;
line-height: 24px;
margin-top: 4px;
&.underline {
text-decoration: underline;
}
}
h5 {
font-size: 14px;
}
p {
font-size: 13px;
@media screen and (max-width: 768px) {
font-size: 14px;
}
}
a {
color: $common-link-color;
text-decoration: none;
&:hover,
&:focus {
color: darken($common-link-color, 20%);
text-decoration: underline;
}
.bg-primary &:hover,
.bg-primary &:focus {
color: $white;
}
}
label,
textarea.form-control {
font-size: 13px;
}
.monospace {
font-family: $font-family-monospace;
}
.contract-address {
display: inline-block;
text-decoration: underline;
text-decoration-style: dashed;
&:hover {
text-decoration-style: none;
}
}
.text {
&-transaction {
color: $blue;
}
&-contract-call {
color: $green;
}
&-contract-creation {
color: $pink;
}
&-token {
color: $orange;
}
&-internal-transaction {
color: $teal;
}
&-faded {
opacity: 0.7;
}
}
[data-transaction-status="Success"],
[data-internal-transaction-type="Reward"] {
color: $success;
}
[data-internal-transaction-type="Call"] {
color: $blue;
}
[data-internal-transaction-type="Delegate Call"] {
color: $purple;
}
[data-internal-transaction-type="Create"] {
color: $pink;
}
[data-transaction-status^="Error"],
[data-internal-transaction-type="Suicide"] {
color: $danger;
}

@ -0,0 +1,136 @@
@import "./mixins";
/* Phoenix flash messages */
.alert:empty {
display: none;
}
/* This file is for your main application css. */
// Font Awesome
$fa-font-path: "~@fortawesome/fontawesome-free/webfonts";
@import "~@fortawesome/fontawesome-free/scss/fontawesome";
@import "~@fortawesome/fontawesome-free/scss/brands";
@import "~@fortawesome/fontawesome-free/scss/regular";
@import "~@fortawesome/fontawesome-free/scss/solid";
// Bootstrap Core CSS
@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/variables";
@import "~bootstrap/scss/mixins";
@import "theme/variables";
@import "~bootstrap/scss/root";
@import "~bootstrap/scss/reboot";
@import "~bootstrap/scss/grid";
@import "~bootstrap/scss/code";
@import "~bootstrap/scss/close";
@import "~bootstrap/scss/buttons";
@import "~bootstrap/scss/forms";
@import "~bootstrap/scss/input-group";
@import "~bootstrap/scss/utilities/spacing";
@import "~bootstrap/scss/utilities/sizing";
@import "~bootstrap/scss/utilities/display";
@import "~bootstrap/scss/utilities/flex";
@import "~bootstrap/scss/utilities/float";
@import "~bootstrap/scss/utilities/text";
@import "~bootstrap/scss/utilities/background";
@import "~bootstrap/scss/utilities/position";
@import "~bootstrap/scss/utilities/borders";
@import "~bootstrap/scss/progress";
// Bootstrap Components
@import "~bootstrap/scss/alert";
@import "~bootstrap/scss/badge";
@import "~bootstrap/scss/card";
@import "~bootstrap/scss/dropdown";
@import "~bootstrap/scss/forms";
@import "~bootstrap/scss/nav";
@import "~bootstrap/scss/navbar";
@import "~bootstrap/scss/pagination";
@import "~bootstrap/scss/tables";
@import "~bootstrap/scss/transitions";
// Code highlight
@import "~highlight.js/styles/default";
//Custom theme
@import "theme/fonts";
// Custom SCSS
@import "layout";
@import "typography";
@import "code";
@import "helpers";
@import "elements";
@import "forms";
@import "components/panels";
@import "components/nav_tabs";
@import "components/dot";
@import "components/pagination_container";
@import "components/address_link";
@import "components/footer";
@import "components/filter";
@import "components/button";
@import "components/table";
@import "components/navbar";
@import "components/alerts";
@import "components/animations";
@import "components/card";
@import "components/tile";
@import "components/dashboard-banner";
@import "components/icon-link";
@import "components/badge";
@import "components/description-list";
@import "components/nounderline-link";
@import "components/token-balance-dropdown";
@import "components/address-overview";
@import "components/token_tile_view_more";
@import "components/dropdown";
@import "components/loading-spinner";
@import "components/transaction-input";
@import "components/coin-balance-tile";
@import "components/highlight";
@import "components/btn_full";
@import "components/btn_line";
@import "components/check";
@import "components/stakes_variables";
@import "components/stakes_table";
@import "components/form";
@import "components/btn_add_to_mm";
@import "components/btn_copy";
@import "components/btn_qr";
@import "components/btn_wallet";
@import "components/btn_contract";
@import "components/btn_address_card";
@import "components/btn_dropdown_line";
@import "components/transaction";
@import "components/api";
@import "components/verify_other_explorers";
@import "components/errors";
@import "components/log-search";
@import "components/radio";
@import "components/modal_variables";
@import "components/new_smart_contract";
@import "components/radio_big";
@import "components/btn_no_border";
@import "components/custom_tooltips";
@import "components/_erc721_token_image_container";
@import "components/_inventory_token_instance_image_container";
@import "components/_external_link";
@import "components/_label";
@import "components/_token";
@import "components/_dropzone";
@import "components/_search";
@import "components/_ad";
@import "components/_account";
// Font Awesome
@import "components/_fontawesome_icon";
@import "theme/dark-theme";
@import "theme/custom_contracts/dark-forest-theme";
@import "theme/custom_contracts/circles-theme";

@ -0,0 +1,143 @@
div.divider {
height: inherit;
width: 1px;
background: #828ba0;
margin-left: 10px;
margin-right: 10px;
}
input.profile-item {
margin-left: 10px;
color: #828ba0;
outline: none;
}
.header-account {
font-size: 18px;
}
.label-account {
font-size: 1rem;
}
.white {
color: #fff;
}
.card-body-account {
max-width: none !important;
}
.form-input {
display: flex;
margin-bottom: 1rem;
}
.form-checkbox {
margin-right: 0.5rem;
align-self: center;
}
.label-checkbox {
font-size: 14px;
margin-bottom: 0;
}
.o-flow-x {
overflow-x: auto;
}
.fs-14 {
font-size: 14px;
}
.acc-link-active {
&:hover, &:focus {
background-color: $primary !important;
color: #fff !important;
}
background-color: $primary;
color: #fff;
}
.table-watchlist {
margin: 30px;
@include media-breakpoint-down(md) {
margin: 0;
}
}
.form-error {
display: block;
font-size: 13px;
line-height: 1.2;
padding-top: 10px;
}
.navbar-account {
@include media-breakpoint-down(sm) {
max-width: 100%;
flex-grow: 1;
}
}
.nav-item.account {
@include media-breakpoint-down(sm) {
width: auto;
display: inline-grid;
}
}
.nav.account {
@include media-breakpoint-down(sm) {
display: inline;
}
}
li.public-tags-address {
list-style: none;
display: flex;
}
input.public-tags-address {
flex-basis: 557px;
width: auto;
}
.add-form-field {
background: none;
border: none;
margin-left: 0.5px;
}
.remove-form-field {
background: none;
border: none;
svg {
margin-top: 3px;
}
}
.multiple-input-fields-container {
padding-inline-start: 0;
display: inline-block;
margin-bottom: 0;
}
.line-input {
@include media-breakpoint-up(md) {
display: flex;
justify-content: space-between;
.form-group {
flex-grow: 1;
margin-right: 4rem;
}
}
}
.mr-4-rem {
margin-right: 4rem;
}

@ -0,0 +1,9 @@
.ad-container {
display: table;
margin: 0 auto;
height: 96px;
}
a.ad-url {
color: $tile-body-a-color;
}

@ -0,0 +1,84 @@
.address-detail-hash-title {
color: #333;
font-size: 14px;
font-weight: bold;
line-height: 1.2;
text-align: left;
word-break: break-all;
}
.overview-title-buttons {
display: flex;
}
.overview-title-item {
display: block;
flex-grow: 0;
flex-shrink: 0;
height: fit-content;
margin-right: 8px;
&:last-child {
margin-right: 0;
}
}
.address-overview {
.card-section {
margin-bottom: $common-container-margin;
&:first-child {
.card {
margin-right: $common-container-margin;
@include media-breakpoint-down(md) {
margin-right: 0;
}
}
}
}
.card {
margin-bottom: 0;
height: 100%;
}
}
.balance-card-title {
margin-bottom: 0.5rem;
}
.address-detail-item {
margin-right: 1em;
padding-bottom: 0.5em;
}
.address-balance-text {
font-size: 12px;
font-weight: bold;
line-height: 1.2;
margin: 0 0 12px;
&:last-child {
margin-bottom: 0;
}
}
.address-current-balance {
line-height: 1.2;
margin: 0 0 12px;
font-weight: 400;
small {
font-size: 11px;
}
&:last-child {
margin-bottom: 0;
}
}
.logs-decoded {
line-height: 25px!important;
}

@ -0,0 +1,23 @@
.address-link {
&__font {
font-family: $font-family-monospace;
}
&__type {
padding: 0 3px;
}
&__seperator {
margin: 0 2px;
}
&__copy-button {
background-color: $gray-100;
appearance: none;
border-color: transparent transparent transparent $border-color;
i {
color: $gray-500 !important;
}
}
}

@ -0,0 +1,9 @@
$alert-danger-background-color: #fff3f7 !default;
$alert-danger-border-color: #fff3f7 !default;
$alert-danger-color: #ff7986 !default;
.alert-danger {
background-color: $alert-danger-background-color;
border-color: $alert-danger-border-color;
color: $alert-danger-color;
}

@ -0,0 +1,94 @@
@keyframes fade-in {
0% {
transform: scale(0.97);
opacity: 0;
}
50% {
transform: scale(1);
}
100% {
transform: scale(1);
opacity: 1;
}
}
@keyframes fade-up-blocks-chain {
0% {
flex-basis: 0%;
width: 0%;
opacity: 0;
overflow-x: hidden;
}
50% {
opacity: 0;
}
100% {
flex-basis: 25%;
width: 25%;
opacity: 1;
overflow-x: auto;
}
}
@keyframes fade-up {
0% {
height: 0;
opacity: 0;
}
25% {
opacity: 0;
transform: translateY(10px) scale(0.97);
}
100% {
height: 100%;
opacity: 1;
transform: translateY(0) scale(1);
}
}
@keyframes shrink-out {
0% {
transform: scale(1);
opacity: 1;
}
100% {
opacity: 0;
transform: scale(0.75);
}
}
.fade-in {
animation: fade-in 0.6s ease-out 0.4s backwards;
}
.fade-up-blocks-chain {
will-change: transform, opacity, width;
white-space: nowrap;
animation: fade-up-blocks-chain 0.3s cubic-bezier(0.455, 0.03, 0.515, 0.955);
@include media-breakpoint-down(md) {
animation: fade-up 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}
}
.fade-up {
will-change: transform, opacity, height;
animation: fade-up 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955);
@media (max-width: $breakpoint-md) {
max-height: 300px;
animation: fade-up--mobile 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}
}
.shrink-out {
transform-origin: bottom center;
animation: shrink-out 0.3s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards;
}

@ -0,0 +1,254 @@
@use 'sass:math';
$api-text-monospace-color: $secondary !default;
$api-text-monospace-background: rgba($api-text-monospace-color, 0.1) !default;
$api-anchors-list-background-color: #f6f7f9 !default;
$api-doc-list-item-title-color: #333 !default;
$api-doc-list-item-view-more-color: $api-doc-list-item-title-color !default;
.api-text-monospace {
color: $api-text-monospace-color;
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
"Courier New", monospace;
}
.api-text-monospace-background {
background-color: $api-text-monospace-background;
border-radius: 2px;
font-weight: 300;
padding: 5px 6px;
}
.api-anchors-list {
background-color: $api-anchors-list-background-color;
column-gap: 40px;
display: grid;
grid-auto-flow: column;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr;
padding: 30px;
row-gap: 25px;
@include media-breakpoint-down(md) {
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr 1fr;
}
@include media-breakpoint-down(sm) {
grid-auto-flow: row;
grid-template-columns: 1fr;
grid-template-rows: none;
}
}
.api-anchors-list-item {
display: grid;
grid-template-columns: 0.75fr minmax(0, 1.25fr);
&:hover {
text-decoration: none;
}
}
.api-anchors-list-item-title {
align-self: center;
color: #333;
font-size: 14px;
font-weight: 300;
line-height: 1.2;
margin: 0;
}
.api-anchors-list-item-value {
align-self: center;
font-size: 12px;
line-height: 1.2;
white-space: nowrap;
}
.api-text-title {
font-size: 12px;
line-height: 1.2;
margin-left: 20px;
}
.api-doc-list-item {
border-bottom: 1px solid $base-border-color;
padding: $card-vertical-padding $card-horizontal-padding;
&:last-child {
border-bottom: none;
}
}
.api-doc-list-item-contents {
display: flex;
justify-content: space-between;
@include media-breakpoint-down(sm) {
flex-direction: column;
}
}
.api-doc-list-item-title {
color: $api-doc-list-item-title-color;
font-size: 15px;
font-weight: 400;
line-height: 1.2;
margin: 0 0 15px;
}
.api-doc-list-item-query {
display: inline-block;
font-size: 12px;
line-height: 1.2;
margin-bottom: 20px;
word-break: break-all;
word-wrap: break-word;
> strong {
font-weight: 700;
}
}
.api-doc-list-item-text {
color: #aaa;
font-size: 14px;
font-weight: normal;
line-height: 1.5;
margin: 0;
}
.api-doc-list-item-description {
width: 100%
}
.api-doc-list-item-controls {
display: flex;
flex-direction: column;
flex-grow: 1;
margin-left: 50px;
@include media-breakpoint-down(sm) {
flex-direction: row;
justify-content: space-between;
margin-left: 0;
padding-top: 25px;
}
}
.api-doc-list-item-controls-badges {
display: flex;
justify-content: flex-end;
.api-badge {
margin-right: 8px;
&:last-child {
margin-right: 0;
}
}
}
.api-doc-list-item-controls-view-more {
align-self: flex-end;
color: $api-doc-list-item-view-more-color;
cursor: pointer;
font-size: 14px;
margin-top: auto;
white-space: nowrap;
.fa {
margin-left: 5px;
}
}
[aria-expanded="false"] {
.api-doc-list-item-controls-view-more-open {
display: block;
}
.api-doc-list-item-controls-view-more-close {
display: none;
}
}
[aria-expanded="true"] {
.api-doc-list-item-controls-view-more-open {
display: none;
}
.api-doc-list-item-controls-view-more-close {
display: block;
}
}
.api-doc-parameters-container {
border-top: 1px solid $base-border-color;
margin-top: 20px;
padding-top: $card-vertical-padding;
}
.api-doc-parameters-list {
border-bottom: 1px solid $base-border-color;
margin-bottom: $card-vertical-padding;
padding-bottom: math.div($card-vertical-padding, 2);
}
.api-doc-parameters-list-title {
color: #333;
font-size: 16px;
font-weight: 500;
line-height: 1.2;
margin: 0 0 15px;
white-space: nowrap;
}
.api-doc-parameters-list-item {
margin-bottom: 15px;
&:last-child {
margin-bottom: 0;
}
@include media-breakpoint-down(sm) {
margin-bottom: 30px;
[class*="col-"] {
margin-bottom: 8px;
&:last-child {
margin-bottom: 0;
}
}
}
}
.api-doc-parameters-list-item-title {
color: #333;
font-size: 14px;
font-weight: 500;
line-height: 1.2;
margin: 0 0 8px;
}
.api-doc-parameters-list-item-subtitle {
color: #aaa;
font-size: 13px;
font-weight: 400;
line-height: 1.2;
margin: 0;
}
.api-doc-parameters-list-item-description {
color: #333;
font-size: 14px;
font-weight: 400;
line-height: 1.2;
margin: 0 0 8px;
&:last-child {
margin-bottom: 0;
}
strong {
font-weight: 700;
}
}

@ -0,0 +1,45 @@
$badge-success-color: #15bba6 !default;
$badge-success-background-color: rgba($badge-success-color, 0.1) !default;
$badge-danger-color: #ed9966 !default;
$badge-danger-background-color: rgba($badge-danger-color, 0.1) !default;
$badge-neutral-color: $secondary !default;
$badge-neutral-background-color: rgba($secondary, .1) !default;
.badge {
color: $white;
&.tile-badge {
font-size: 10px;
font-weight: bold;
height: 20px;
line-height: 20px;
margin: 0;
padding: 0 11px;
width: auto;
}
&.api-badge {
font-size: 12px;
font-weight: 700;
height: 24px;
line-height: 26px;
margin: 0;
padding: 0 8px;
width: auto;
}
&.badge-success {
background-color: $badge-success-background-color;
color: $badge-success-color;
}
&.badge-danger {
background-color: $badge-danger-background-color;
color: $badge-danger-color;
}
&.badge-neutral {
background-color: $badge-neutral-background-color;
color: $badge-neutral-color;
}
}

@ -0,0 +1,28 @@
.btn-add-to-mm {
background-image: url("../static/images/icons/metamask-fox.svg");
background-position: center;
background-size: 22px 22px;
margin-bottom: 1px;
width: 22px;
height: 22px;
background-repeat: no-repeat;
display: inline-block;
vertical-align: middle;
cursor: pointer;
}
.btn-add-chain-to-mm {
background-image: url("../static/images/icons/metamask-fox.svg");
background-position: center;
background-size: 20px 20px;
background-repeat: no-repeat;
background-position-x: 30px;
background-position-y: center;
padding-left: 40px;
outline: none;
&.in-footer {
background-position-x: 0px;
padding-left: 25px;
}
}

@ -0,0 +1,11 @@
$btn-address-card-icon-color: $primary !default;
$btn-address-card-icon-dimensions: 31px !default;
.btn-address-card-icon {
@include square-icon-button($btn-address-card-icon-color, $btn-address-card-icon-dimensions);
svg {
height: 10px;
width: 20px;
}
}

@ -0,0 +1,18 @@
$btn-contract-color: $primary !default;
$btn-contract-dimensions: 31px !default;
.btn-contract-icon {
@include square-icon-button($btn-contract-color, $btn-contract-dimensions);
display: block;
@media not all and (min-resolution:.001dpcm)
{ @supports (-webkit-appearance:none) {
svg {
&.safari_only {
height: 32px;
width: 32px;
margin: 6.5px;
}
}
}}
}

@ -0,0 +1,61 @@
$btn-copy-color: $primary !default;
$btn-copy-dimensions: 31px !default;
$btn-copy-small-dimensions: 22px !default;
.btn-copy-icon {
@include square-icon-button-inline($btn-copy-color, $btn-copy-dimensions);
&.btn-copy-icon-no-borders {
&:hover {
background-color: transparent;
path {
fill: $btn-copy-color;
}
}
border: none;
}
svg {
width: $btn-copy-dimensions;
height: $btn-copy-dimensions;
}
&.btn-copy-icon-small {
&.btn-copy-icon-custom {
position: absolute;
}
@include square-icon-button-inline($btn-copy-color, $btn-copy-small-dimensions);
&.btn-copy-icon-no-borders {
&:hover {
background-color: transparent;
path {
fill: $btn-copy-color;
}
}
border: none;
}
svg {
width: $btn-copy-small-dimensions;
height: $btn-copy-small-dimensions;
}
}
}
.btn-copy-mobile-container {
@include media-breakpoint-up(md) {
display: flex;
}
}
.btn-copy-mobile {
@include media-breakpoint-up(md) {
margin-left: 0.5rem;
}
}
.btn-copy-tx-raw-input-container {
position: relative;
width: 19px;
}
.btn-copy-tx-raw-input {
position: absolute;
bottom: 0;
}

@ -0,0 +1,21 @@
$btn-dropdown-line-bg: #fff !default;
$btn-dropdown-line-color: #e2e5ec !default;
$btn-dropdown-line-color-hover: #f5f6fa !default;
$btn-dropdown-line-font: #333;
.btn-dropdown-line {
@include btn-line($btn-dropdown-line-bg, $btn-dropdown-line-color, 14px);
border-color: $btn-dropdown-line-color;
color: $btn-dropdown-line-font;
outline: none !important;
margin-right: 20px;
&.no-rm {
margin-right: 0;
}
&:hover {
background-color: $btn-dropdown-line-color-hover;
border-color: $btn-dropdown-line-color;
color: $btn-dropdown-line-font;
}
}

@ -0,0 +1,6 @@
$btn-full-primary-bg: $primary !default;
$btn-full-primary-color: #fff !default;
.btn-full-primary {
@include btn-full($btn-full-primary-bg, $btn-full-primary-color);
}

@ -0,0 +1,16 @@
$btn-line-bg: #fff !default;
$btn-line-color: $secondary !default;
.btn-line {
@include btn-line($btn-line-bg, $btn-line-color);
}
.btn-line-inversed {
@include btn-line($btn-line-color, $btn-line-bg);
}
.btn-line-inversed:hover {
background-color: $btn-line-color;
color: $btn-line-bg;
text-decoration: none;
}

@ -0,0 +1,30 @@
$btn-no-border-bg: #fff !default;
$btn-no-border-color: $primary !default;
.btn-no-border {
@include btn-line($btn-no-border-bg, $btn-no-border-color);
border-color: $btn-no-border-bg;
&:hover {
border-color: $btn-no-border-color;
}
}
.btn-no-border-link-to-tems {
background-color: rgba($primary, 0.1) !important;
border-color: #00000000 !important;
align-items: center;
border-radius: 2px;
display: flex;
font-size: 12px;
position: relative;
user-select: none;
text-align: center;
white-space: nowrap;
color: $primary !important;
&:hover {
border-color: #f5f6fa;
}
}

@ -0,0 +1,6 @@
$btn-qr-color: $primary !default;
$btn-qr-dimensions: 31px !default;
.btn-qr-icon {
@include square-icon-button($btn-qr-color, $btn-qr-dimensions);
}

@ -0,0 +1,32 @@
.btn-swap {
background-size: 20px 21px;
width: 20px;
height: 21px;
background-repeat: no-repeat;
display: inline-block;
margin-bottom: 3px;
vertical-align: middle;
cursor: pointer;
&.honeypot {
background-image: url(../static/images/icons/swap/honeyswap.png);
}
&.sushi {
background-image: url(../static/images/icons/swap/sushi.svg);
}
&.swapr {
background-image: url(../static/images/icons/swap/swapr.svg);
}
&.curve {
background-image: url(../static/images/icons/swap/curve.svg);
}
&.component {
background-image: url(../static/images/icons/swap/component.png);
}
&.cowswap {
background-image: url(../static/images/icons/swap/cowswap.png);
}
&.oneinch {
background-image: url(../static/images/icons/swap/1inch.svg);
}
}

@ -0,0 +1,10 @@
$btn-wallet-color: $btn-line-color !default;
$btn-wallet-dimensions: 31px !default;
.btn-wallet-icon {
@include square-icon-button($btn-wallet-color, $btn-wallet-dimensions);
color: $btn-wallet-color;
&:hover {
color: #fff;
}
}

@ -0,0 +1,104 @@
$button-primary-color: $primary !default;
$button-secondary-color: $secondary !default;
.button, .btn {
border-radius: 2px;
border: none;
cursor: pointer;
display: inline-block;
line-height: 1.2;
padding: 10px 16px;
text-align: center;
text-decoration: none;
transition: $transition-cont;
white-space: nowrap;
&-primary {
background-color: $button-primary-color;
border: 1px solid $button-primary-color;
color: #fff;
&:hover,
&:focus {
background-color: darken($button-primary-color, 10%);
border-color: darken($button-primary-color, 10%);
color: #fff;
outline: none !important;
text-decoration: none;
}
&:disabled {
background-color: $gray-300;
color: $gray-800;
text-decoration: none;
}
}
&-secondary {
background-color: #fff;
border: 1px solid $button-secondary-color;
color: $button-secondary-color;
font-weight: 400;
&:hover,
&:focus {
background-color: darken($button-secondary-color, 10%);
border-color: darken($button-secondary-color, 10%);
color: #fff;
outline: none !important;
text-decoration: none;
}
}
&-xs {
font-size: 11px;
padding: 6px 9px 6px !important;
}
&-sm {
font-size: 12px;
padding: 10px 20px 10px;
}
&-md {
font-size: 1.5rem;
padding: 15px 30px 15px;
}
&-lg {
font-size: 1.5rem;
padding: 20px 60px 20px;
}
&-danger {
background-color: #dc3545 !important;
border: 1px solid #dc3545 !important;
}
// Block button
// -------------------------
&-block {
display: block;
width: 100%;
}
&-disabled,
&:disabled {
background-color: $gray-300;
color: $gray-500;
text-decoration: none;
}
}
// Vertically space out multiple block buttons
.button-block + .button-block {
margin-top: 5px;
}
.spinner {
background-image: url('../static/images/spinner.svg');
background-position: right;
background-repeat: no-repeat;
background-size: 30px;
}

@ -0,0 +1,347 @@
$card-background-color: #fff !default;
$card-tab-active: $primary !default;
$card-default-border-radius: 10px !default;
$card-horizontal-padding: 30px;
$card-vertical-padding: 30px;
$card-background-1: $primary !default;
$card-background-1-text-color: #fff !default;
$card-tab-icon-color: #20b760 !default;
$card-tab-icon-color-active: #fff !default;
.card {
background-color: $card-background-color;
border-radius: $card-default-border-radius;
border: none;
box-shadow: 0 0 30px 0 rgba(202, 199, 226, 0.5);
margin-bottom: $common-container-margin;
.block-details-row {
flex-direction: row;
@include media-breakpoint-down(sm) {
flex-direction: column;
}
.block-detail-el {
& + .block-detail-el {
@include media-breakpoint-down(sm) {
margin-top: 6px;
}
}
}
}
}
.card-background-1 {
background-color: $card-background-1;
color: $card-background-1-text-color;
a:not(.dropdown-item),
a:not(.dropdown-item):hover {
color: $card-background-1-text-color;
}
}
.card-header {
background: transparent;
border-bottom: 1px solid $base-border-color;
padding: $card-vertical-padding $card-horizontal-padding;
&-tabs {
margin: (-$card-spacer-y) (-$card-spacer-x);
}
}
.card-title {
font-size: 18px;
font-weight: normal;
line-height: 1.2rem;
margin-bottom: 2rem;
&.lg-card-title {
@media (max-width: 374px) {
font-size: 13px;
}
}
&.margin-bottom-md {
margin-bottom: 25px;
}
&.margin-bottom-sm {
margin-bottom: 15px;
}
&.margin-bottom-xs {
margin-bottom: 10px;
}
&.margin-bottom-0 {
margin-bottom: 0;
}
.card-title-container & {
line-height: 1.2;
margin: 0;
@include media-breakpoint-down(sm) {
margin-bottom: 25px;
}
}
}
.card-subtitle {
color: #333;
font-size: 12px;
font-weight: normal;
line-height: 1.2;
margin: 0 0 30px;
&.margin-bottom-0 {
margin-bottom: 0;
}
}
.card-title-container {
align-items: center;
display: flex;
justify-content: space-between;
padding: 25px $card-horizontal-padding;
@include media-breakpoint-down(sm) {
flex-direction: column;
}
}
.card-title-paging {
padding: 0px $card-horizontal-padding;
display: flex;
justify-content: flex-end;
min-height: 54px;
}
.card-footer-paging {
padding: 0px $card-horizontal-padding;
padding-bottom: 25px;
display: flex;
justify-content: flex-end;
min-height: 80px;
}
.card-title-controls {
align-items: center;
display: flex;
justify-content: flex-end;
@include media-breakpoint-down(sm) {
flex-direction: column;
}
.card-title-control {
margin-right: 20px;
&:last-child {
margin-right: 0;
}
@include media-breakpoint-down(sm) {
margin-bottom: 20px;
margin-right: 0;
&:last-child {
margin-bottom: 0;
}
}
}
}
.card-body {
padding: $card-horizontal-padding;
}
.card-body-flex-column-space-between {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.card-server-response-body {
max-height: 400px;
overflow-y: auto;
}
.card-chain-blocks {
min-height: 233px;
max-height: auto;
[class*="col-"]:last-child {
.tile {
margin-bottom: 0;
}
}
}
.card-chain-transactions {
min-height: 664px;
max-height: auto;
.tile {
margin-bottom: 0;
}
}
.card-tabs {
align-items: center;
border-top-left-radius: $card-default-border-radius;
border-top-right-radius: $card-default-border-radius;
border-bottom: 1px solid $base-border-color;
display: flex;
justify-content: flex-start;
overflow: hidden;
@include media-breakpoint-down(md) {
flex-direction: column;
}
}
.card-tab {
align-items: center;
background-color: $card-background-color;
color: #333;
cursor: pointer;
display: flex;
font-size: 14px;
font-weight: normal;
height: 70px;
padding: 0 25px;
text-align: center;
transition: $transition-cont;
&:hover {
background-color: rgba($card-tab-active, .15);
color: $card-tab-active;
text-decoration: none;
}
@include media-breakpoint-down(md) {
display: none;
width: 100%;
}
.fa-check-circle {
color: $card-tab-icon-color;
margin-left: 6px;
}
&.active {
background-color: $card-tab-active;
color: #fff;
cursor: default;
text-decoration: none;
.fa-check-circle {
color: $card-tab-icon-color-active;
}
@include media-breakpoint-down(md) {
cursor: pointer;
display: flex;
order: -1;
&::after {
border-bottom: 0;
border-left: 0.3em solid transparent;
border-right: 0.3em solid transparent;
border-top: 0.3em solid;
content: "";
display: inline-block;
height: 0;
margin-left: 10px;
width: 0;
}
&.noCaret::after {
display: none;
}
}
}
}
.mob-transaction {
@include media-breakpoint-down(sm) {
margin-left: 15px!important;
}
}
.implementation-container {
margin-top: 10px;
}
.implementation-title {
float: left;
margin-right: 5px;
}
.implementation-value {
line-height: 30px;
}
.connect-container {
display: flex;
line-height: 36px;
}
.write-contract-btn {
padding: 6px 8px !important;
height: 31px !important;
font-size: 11px;
}
.contract-plus-btn-container {
height: 31px !important;
&:hover i {
color: #fff !important;
}
}
.contract-plus-btn {
color: $primary;
font-size: 15px;
}
.custom-power-input {
height: 20px;
width: 50px !important;
margin-top: -10px !important;
}
.list-title-description {
@media (min-width: 992px) {
display: inline-block;
}
}
.list-top-pagination-container-wrapper {
@media (min-width: 992px) {
float: right;
}
}
.function-output {
margin-left: -1rem;
}
.functions-tabs input[type="radio"] {
display: none;
}
.card-misc-container {
padding-left: $card-horizontal-padding;
padding-top: $card-horizontal-padding;
.btn-line-inversed,
.btn-line {
display: inline-flex;
}
}
.nav-pills .nav-link.active {
background-color: $primary;
}

@ -0,0 +1,48 @@
$check-color: $primary !default;
$check-dimensions: 14px !default;
.check {
align-items: center;
display: flex;
position: relative;
input[type="checkbox"] {
height: 100%;
opacity: 0;
position: absolute;
width: 100%;
z-index: 5;
&:checked + .check-icon::before {
background-color: $check-color;
content: "";
height: 6px;
left: 50%;
position: absolute;
top: 50%;
transform: translateX(-50%) translateY(-50%);
width: 6px;
}
}
.check-icon {
top: -1px;
border: 1px solid $base-border-color;
flex-grow: 0;
flex-shrink: 0;
height: $check-dimensions;
margin: 0 10px 0 0;
position: relative;
width: $check-dimensions;
z-index: 1;
}
.check-text {
font-size: 14px;
font-weight: normal;
line-height: 1.2;
position: relative;
white-space: nowrap;
z-index: 1;
}
}

@ -0,0 +1,27 @@
$check-tooltip-background: #f5f6fa !default;
$check-tooltip-background-active: $primary !default;
$check-tooltip-check: #a3a9b5 !default;
$check-tooltip-check-active: #fff !default;
.check-tooltip {
display: block;
height: 16px;
width: 16px;
cursor: pointer;
.check-tooltip-circle {
fill: $check-tooltip-background;
}
.check-tooltip-check {
fill: $check-tooltip-check;
}
&:hover {
.check-tooltip-circle {
fill: $check-tooltip-background-active;
}
.check-tooltip-check {
fill: $check-tooltip-check-active;
}
}
}

@ -0,0 +1,9 @@
.tile.tile-type-coin-balance {
[data-balance-change-sign="Positive"] {
color: $green;
}
[data-balance-change-sign="Negative"] {
color: $red;
}
}

@ -0,0 +1,135 @@
/* Custom Validator Tooltip at Block Details Page */
$tooltip-background-color: $btn-line-color !default;
.tooltip-validator-details {
left: -100px !important;
}
/* Custom Validator Tooltip at Block Details Page end*/
/* Inversed color Bootstrap Tooltip */
.tooltip-inversed-color {
.tooltip-inner {
background-color: #fff !important;
color: #333 !important;
}
}
.tooltip-inversed-color.bs-tooltip-top .arrow::before,
.tooltip-inversed-color.bs-tooltip-auto[x-placement^="top"] .arrow::before {
border-top-color: #fff !important;
}
.tooltip-inversed-color.bs-tooltip-right .arrow::before,
.tooltip-inversed-color.bs-tooltip-auto[x-placement^="right"] .arrow::before {
border-right-color: #fff !important;
}
.tooltip-inversed-color.bs-tooltip-bottom .arrow::before,
.tooltip-inversed-color.bs-tooltip-auto[x-placement^="bottom"] .arrow::before {
border-bottom-color: #fff !important;
}
.tooltip-inversed-color.bs-tooltip-left .arrow::before,
.tooltip-inversed-color.bs-tooltip-auto[x-placement^="left"] .arrow::before {
border-left-color: #fff !important;
}
/* Inversed color Bootstrap Tooltip end*/
/* Pale color Bootstrap Tooltip */
.tooltip-pale-color {
.tooltip-inner {
background-color: rgba(#fff, 0.5) !important;
color: #333 !important;
}
}
.tooltip-pale-color.bs-tooltip-top .arrow::before,
.tooltip-pale-color.bs-tooltip-auto[x-placement^="top"] .arrow::before {
border-top-color: rgba($primary, 0.5) !important;
}
.tooltip-pale-color.bs-tooltip-right .arrow::before,
.tooltip-pale-color.bs-tooltip-auto[x-placement^="right"] .arrow::before {
border-right-color: rgba($primary, 0.5) !important;
}
.tooltip-pale-color.bs-tooltip-bottom .arrow::before,
.tooltip-pale-color.bs-tooltip-auto[x-placement^="bottom"] .arrow::before {
border-bottom-color: rgba($primary, 0.5) !important;
}
.tooltip-pale-color.bs-tooltip-left .arrow::before,
.tooltip-pale-color.bs-tooltip-auto[x-placement^="left"] .arrow::before {
border-left-color: rgba($primary, 0.5) !important;
}
/* Pale color Bootstrap Tooltip end*/
.tooltip-market-cap {
.tooltip-inner {
@media (min-width: 576px) {
max-width: 250px !important;
}
@media (min-width: 768px) {
max-width: 350px !important;
}
width: 350px !important;
}
}
.tooltip-gas-usage {
.tooltip-inner {
@media (min-width: 576px) {
max-width: 150px !important;
}
@media (min-width: 768px) {
max-width: 150px !important;
}
width: 150px !important;
}
}
.tooltip-gas-tracker {
.tooltip-inner {
@media (min-width: 576px) {
max-width: 150px !important;
}
@media (min-width: 768px) {
max-width: 150px !important;
}
width: 150px !important;
}
}
.custom-tooltip {
font-family: Nunito, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.custom-tooltip.header {
font-size: 1.2em;
margin-bottom: 10px;
}
.custom-tooltip.total-transactions {
margin-top: 6px;
@media (min-width: 992px) {
margin-top: 9px;
}
}
.custom-tooltip.description {
width: 100%;
.left {
text-align: left;
}
.right {
text-align: right;
}
}

@ -0,0 +1,289 @@
$dashboard-banner-gradient-start: $primary !default;
$dashboard-banner-gradient-end: lighten(
$dashboard-banner-gradient-start,
5%
) !default;
$dashboard-banner-network-plain-container-background-color: lighten($dashboard-banner-gradient-end, 5%) !default;
$dashboard-line-color-price: lighten($dashboard-banner-gradient-end, 5%) !default;
$dashboard-line-color-price-dark-theme: lighten($dashboard-banner-gradient-end, 5%) !default;
$dashboard-line-color-market: $secondary !default;
$dashboard-line-color-market-dark-theme: $secondary !default;
$dashboard-line-color-transactions: $warning !default;
$dashboard-line-color-transactions-dark-theme: $warning !default;
$dashboard-stats-item-label-color: #fff !default;
$dashboard-stats-item-value-color: rgba(#fff, 0.8) !default;
$dashboard-banner-chart-legend-label-color: #fff !default;
$dashboard-banner-chart-legend-value-color: $dashboard-stats-item-value-color !default;
$dashboard-stats-item-border-color: $primary !default;
$dashboard-banner-network-plain-container-height: 205px;
$dashboard-banner-chart-axis-font-color: $dashboard-stats-item-value-color !default;
$dashboard-banner-chart-axis-font-color-alt: #333;
.dashboard-banner-container {
@include gradient-container();
margin-bottom: 3rem;
overflow: hidden;
padding: 0;
position: relative;
height: 264px;
@include media-breakpoint-down(sm) {
height: auto;
}
@include media-breakpoint-down(md) {
height: auto;
}
}
.dashboard-banner {
display: flex;
justify-content: space-between;
position: relative;
z-index: 9;
@include media-breakpoint-between(lg, xl) {
height: 249px;
}
@include media-breakpoint-down(sm) {
flex-direction: column;
}
}
.dashboard-banner-network-graph {
flex-grow: 1;
padding: 15px 0 0 0;
@include media-breakpoint-up(md) {
min-width: 500px;
}
@include media-breakpoint-down(md) {
display: flex;
flex-direction: column;
padding-top: 20px;
}
}
.dashboard-banner-chart {
flex-grow: 1;
margin: 15px 0 20px 0;
position: relative;
min-height: 100px;
height: calc(100% - 86px);
@include media-breakpoint-down(md) {
flex-grow: 0;
margin-top: 20px;
margin-bottom: auto;
max-width: 100%;
}
> canvas {
max-height: 100%;
max-width: 100%;
width: 100%;
}
@include media-breakpoint-down(sm) {
height: 150px !important;
}
}
.dashboard-banner-chart-legend {
display: grid;
grid-template-columns: 0.6fr 0.9fr 0.9fr 0.9fr;
padding-bottom: 12px;
padding-left:20px;
@include media-breakpoint-down(sm) {
grid-template-columns: 1fr 1fr;
}
.dashboard-banner-chart-legend-item {
padding-bottom: 3px;
padding-left: 12px;
padding-top: 3px;
position: relative;
padding-right: 12px;
@include media-breakpoint-down(md) {
display: flex;
flex-direction: row;
}
@include media-breakpoint-down(sm) {
margin-top: 10px;
}
@media (max-width: 599px) {
padding-top: 0;
padding-bottom: 0;
flex-direction: column;
}
&::before {
border-radius: 2px;
content: "";
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 4px;
}
&.price-per-day {
&::before {
background-color: $dashboard-line-color-price;
}
}
&.gas-price-oracle {
&::before {
background-color: $dashboard-line-color-price;
}
}
&.market-cap-per-day {
&::before {
background-color:$dashboard-line-color-market;
}
}
&.tx-per-day {
&::before {
background-color: $dashboard-line-color-transactions;
}
}
}
.dashboard-banner-chart-legend-label {
color: $dashboard-banner-chart-legend-label-color;
display: block;
font-size: 12px;
font-weight: 600;
line-height: 1.2;
margin: 0 0 5px;
@media (max-width: 374px) {
position: relative;
top: -2px;
}
@include media-breakpoint-down(md) {
margin: 0 5px 0 0;
}
}
.dashboard-banner-chart-legend-value {
color: $dashboard-banner-chart-legend-value-color;
display: block;
font-size: 12px;
font-weight: normal;
line-height: 1.2;
&.inline {
display: inline-block;
}
}
.dashboard-banner-chart-legend-value-container {
white-space: nowrap;
}
.gas-price-icon {
position: relative;
top: -2px;
path {
fill: $dashboard-line-color-price;
}
}
}
.dashboard-banner-network-plain-container {
align-items: center;
align-self: flex-end;
background-color: $dashboard-banner-network-plain-container-background-color;
border-top-left-radius: 10px;
display: flex;
height: $dashboard-banner-network-plain-container-height;
justify-content: center;
margin: 45px 0 -15px 30px;
max-width: 100%;
padding: 30px 0 30px 60px;
width: 750px;
position: relative;
@include media-breakpoint-down(lg) {
margin-top: 15px;
width: 550px;
}
@include media-breakpoint-down(md) {
border-top-right-radius: 10px;
height: auto;
justify-content: flex-start;
margin-left: 0;
max-width: 100%;
padding: 20px 0 20px 20px;
width: 250px;
box-shadow: 0 0 35px 0 rgba(0, 0, 0, 0.2);
}
@include media-breakpoint-down(sm) {
width: 100%;
}
&::after {
background-color: $dashboard-banner-network-plain-container-background-color;
bottom: 0;
content: "";
display: block;
height: $dashboard-banner-network-plain-container-height;
left: 0;
position: absolute;
width: 9999px;
z-index: -1;
box-shadow: 0 0 35px 0 rgba(0, 0, 0, 0.2);
border-top-left-radius: 10px;
@include media-breakpoint-down(md) {
display: none;
}
}
}
.dashboard-banner-network-stats {
column-gap: 25px;
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
@include media-breakpoint-down(lg) {
grid-template-columns: 1fr 1fr;
row-gap: 20px;
}
@include media-breakpoint-down(md) {
grid-template-columns: 1fr;
row-gap: 20px;
}
@include media-breakpoint-down(sm) {
column-gap: 10px;
grid-template-columns: 1fr 1fr;
}
@include stats-item($dashboard-stats-item-border-color, $dashboard-stats-item-label-color, $dashboard-stats-item-value-color);
.dashboard-banner-network-stats-item {
@media (max-width: 374px) {
padding-left: calc(0.6rem + 4px);
padding-right: 0.5rem;
}
}
.dashboard-banner-network-stats-value {
@media (max-width: 374px) {
font-size: 0.9rem;
}
}
}

@ -0,0 +1,23 @@
.transaction {
&__dot {
display: inline-block;
height: 10px;
width: 10px;
border-radius: 50%;
margin-left: 5px;
vertical-align: baseline;
&--pending {
background-color: $gray-500;
}
&--success {
background-color: $success;
}
&--failed {
background-color: $danger;
}
&--out_of_gas {
background-color: $warning;
}
}
}

@ -0,0 +1,116 @@
$dropdown-menu-item-color: #333 !default;
$dropdown-menu-item-hover-color: $secondary !default;
$dropdown-menu-item-hover-background: rgba($secondary, 0.1) !default;
// These styles extend the default Bootstrap styles
.dropdown-menu {
border-bottom: 1px solid #e2e5ec;
border-left: 1px solid #e2e5ec;
border-radius: 0 0 2px 2px !important;
border-right: 1px solid #e2e5ec;
border-top: none;
box-shadow: $box-shadow;
padding: 0;
width: 100%;
&.right {
left: auto;
right: 0;
}
.nav-item & {
border-top-left-radius: 0 !important;
border-top-right-radius: 0 !important;
top: 45px;
.dropdown-item:first-child {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
}
&.exponention-dropdown {
width: 100px;
min-width: 100px;
}
}
.dropdown-item {
color: $dropdown-menu-item-color;
font-size: 12px;
padding: 10px 20px;
transition: $transition-cont;
white-space: initial;
& {
&.active,
&:hover,
&:focus {
background-color: $dropdown-menu-item-hover-background;
color: $dropdown-menu-item-hover-color;
.external-link-icon {
path {
fill: $header-icon-color-hover;
}
}
}
}
&:first-child {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
&:last-child {
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
}
&.header {
&,
&:hover,
&:active {
padding-left: 10px;
background-color: #fff !important;
cursor: default;
color: #333;
font-weight: 700;
}
}
&.division {
border-top: 1px solid $base-border-color;
}
}
.navbar .dropdown-menu {
border: none;
}
.dropdown-search-icon {
color: $gray-300;
left: 8px;
pointer-events: none;
top: 5px;
}
.dropdown-search-field {
padding-left: 2rem;
}
.dropdown-toggle::after {
margin-left: 0.71em;
font-size: 12px !important;
}
.token-balance-dropdown {
transform: none !important;
top: 20px !important;
left: unset !important;
width: 300px !important;
}
.flex-grow-2 {
flex-grow: 2;
}

@ -0,0 +1,541 @@
/*
* The MIT License
* Copyright (c) 2012 Matias Meno <m@tias.me>
*/
@-webkit-keyframes passing-through {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px);
}
30%,
70% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px);
}
100% {
opacity: 0;
-webkit-transform: translateY(-40px);
-moz-transform: translateY(-40px);
-ms-transform: translateY(-40px);
-o-transform: translateY(-40px);
transform: translateY(-40px);
}
}
@-moz-keyframes passing-through {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px);
}
30%,
70% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px);
}
100% {
opacity: 0;
-webkit-transform: translateY(-40px);
-moz-transform: translateY(-40px);
-ms-transform: translateY(-40px);
-o-transform: translateY(-40px);
transform: translateY(-40px);
}
}
@keyframes passing-through {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px);
}
30%,
70% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px);
}
100% {
opacity: 0;
-webkit-transform: translateY(-40px);
-moz-transform: translateY(-40px);
-ms-transform: translateY(-40px);
-o-transform: translateY(-40px);
transform: translateY(-40px);
}
}
@-webkit-keyframes slide-in {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px);
}
30% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px);
}
}
@-moz-keyframes slide-in {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px);
}
30% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px);
}
}
@keyframes slide-in {
0% {
opacity: 0;
-webkit-transform: translateY(40px);
-moz-transform: translateY(40px);
-ms-transform: translateY(40px);
-o-transform: translateY(40px);
transform: translateY(40px);
}
30% {
opacity: 1;
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px);
}
}
@-webkit-keyframes pulse {
0% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}
10% {
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
transform: scale(1.1);
}
20% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}
}
@-moz-keyframes pulse {
0% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}
10% {
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
transform: scale(1.1);
}
20% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}
}
@keyframes pulse {
0% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}
10% {
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
transform: scale(1.1);
}
20% {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}
}
.dropzone-1,
.dropzone-1 * {
box-sizing: border-box;
}
.dropzone-1 {
min-height: 150px;
border: 2px solid rgba(0, 0, 0, 0.3);
background: white;
padding: 20px 20px;
}
.dropzone-1.dz-clickable {
cursor: pointer;
}
.dropzone-1.dz-clickable * {
cursor: default;
}
.dropzone-1.dz-clickable .dz-message,
.dropzone-1.dz-clickable .dz-message * {
cursor: pointer;
}
.dropzone-1.dz-started .dz-message {
display: none;
}
.dropzone-1.dz-drag-hover {
border-style: solid;
}
.dropzone-1.dz-drag-hover .dz-message {
opacity: 0.5;
}
.dropzone-1 .dz-message {
text-align: center;
margin: 2em auto;
}
.dropzone-1 .dz-message .dz-button {
background: none;
color: inherit;
border: none;
padding: 0;
font: inherit;
cursor: pointer;
outline: inherit;
}
.dropzone-1 .dz-preview {
position: relative;
display: inline-block;
vertical-align: top;
margin: 16px;
min-height: 100px;
}
.dropzone-1 .dz-preview:hover {
z-index: 1000;
}
.dropzone-1 .dz-preview:hover .dz-details {
opacity: 1;
}
.dropzone-1 .dz-preview.dz-file-preview .dz-image {
border-radius: 20px;
background: #999;
background: linear-gradient(to bottom, #eee, #ddd);
}
.dropzone-1 .dz-preview.dz-file-preview .dz-details {
opacity: 1;
}
.dropzone-1 .dz-preview.dz-image-preview {
background: white;
}
.dropzone-1 .dz-preview.dz-image-preview .dz-details {
-webkit-transition: opacity 0.2s linear;
-moz-transition: opacity 0.2s linear;
-ms-transition: opacity 0.2s linear;
-o-transition: opacity 0.2s linear;
transition: opacity 0.2s linear;
}
.dropzone-1 .dz-preview .dz-remove {
font-size: 14px;
text-align: center;
display: block;
cursor: pointer;
border: none;
}
.dropzone-1 .dz-preview .dz-remove:hover {
text-decoration: underline;
}
.dropzone-1 .dz-preview:hover .dz-details {
opacity: 1;
}
.dropzone-1 .dz-preview .dz-details {
z-index: 20;
position: absolute;
top: 0;
left: 0;
opacity: 0;
font-size: 13px;
min-width: 100%;
max-width: 100%;
padding: 2em 1em;
text-align: center;
color: rgba(0, 0, 0, 0.9);
line-height: 150%;
}
.dropzone-1 .dz-preview .dz-details .dz-size {
margin-bottom: 1em;
font-size: 16px;
}
.dropzone-1 .dz-preview .dz-details .dz-filename {
white-space: nowrap;
}
.dropzone-1 .dz-preview .dz-details .dz-filename:hover span {
border: 1px solid rgba(200, 200, 200, 0.8);
background-color: rgba(255, 255, 255, 0.8);
}
.dropzone-1 .dz-preview .dz-details .dz-filename:not(:hover) {
overflow: hidden;
text-overflow: ellipsis;
}
.dropzone-1 .dz-preview .dz-details .dz-filename:not(:hover) span {
border: 1px solid transparent;
}
.dropzone-1 .dz-preview .dz-details .dz-filename span,
.dropzone-1 .dz-preview .dz-details .dz-size span {
background-color: rgba(255, 255, 255, 0.4);
padding: 0 0.4em;
border-radius: 3px;
}
.dropzone-1 .dz-preview:hover .dz-image img {
-webkit-transform: scale(1.05, 1.05);
-moz-transform: scale(1.05, 1.05);
-ms-transform: scale(1.05, 1.05);
-o-transform: scale(1.05, 1.05);
transform: scale(1.05, 1.05);
-webkit-filter: blur(8px);
filter: blur(8px);
}
.dropzone-1 .dz-preview .dz-image {
border-radius: 20px;
overflow: hidden;
width: 120px;
height: 120px;
position: relative;
display: block;
z-index: 10;
}
.dropzone-1 .dz-preview .dz-image img {
display: block;
}
.dropzone-1 .dz-preview.dz-success .dz-success-mark {
-webkit-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
-moz-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
-ms-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
-o-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
}
.dropzone-1 .dz-preview.dz-error .dz-error-mark {
opacity: 1;
-webkit-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
-moz-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
-ms-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
-o-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
}
.dropzone-1 .dz-preview .dz-success-mark,
.dropzone-1 .dz-preview .dz-error-mark {
pointer-events: none;
opacity: 0;
z-index: 500;
position: absolute;
display: block;
top: 50%;
left: 50%;
margin-left: -27px;
margin-top: -27px;
}
.dropzone-1 .dz-preview .dz-success-mark svg,
.dropzone-1 .dz-preview .dz-error-mark svg {
display: block;
width: 54px;
height: 54px;
}
.dropzone-1 .dz-preview.dz-processing .dz-progress {
opacity: 1;
-webkit-transition: all 0.2s linear;
-moz-transition: all 0.2s linear;
-ms-transition: all 0.2s linear;
-o-transition: all 0.2s linear;
transition: all 0.2s linear;
}
.dropzone-1 .dz-preview.dz-complete .dz-progress {
opacity: 0;
-webkit-transition: opacity 0.4s ease-in;
-moz-transition: opacity 0.4s ease-in;
-ms-transition: opacity 0.4s ease-in;
-o-transition: opacity 0.4s ease-in;
transition: opacity 0.4s ease-in;
}
.dropzone-1 .dz-preview:not(.dz-processing) .dz-progress {
-webkit-animation: pulse 6s ease infinite;
-moz-animation: pulse 6s ease infinite;
-ms-animation: pulse 6s ease infinite;
-o-animation: pulse 6s ease infinite;
animation: pulse 6s ease infinite;
}
.dropzone-1 .dz-preview .dz-progress {
opacity: 1;
z-index: 1000;
pointer-events: none;
position: absolute;
height: 16px;
left: 50%;
top: 50%;
margin-top: -8px;
width: 80px;
margin-left: -40px;
background: rgba(255, 255, 255, 0.9);
-webkit-transform: scale(1);
border-radius: 8px;
overflow: hidden;
}
.dropzone-1 .dz-preview .dz-progress .dz-upload {
background: #333;
background: linear-gradient(to bottom, #666, #444);
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 0;
-webkit-transition: width 300ms ease-in-out;
-moz-transition: width 300ms ease-in-out;
-ms-transition: width 300ms ease-in-out;
-o-transition: width 300ms ease-in-out;
transition: width 300ms ease-in-out;
}
.dropzone-1 .dz-preview.dz-error .dz-error-message {
display: block;
}
.dropzone-1 .dz-preview.dz-error:hover .dz-error-message {
opacity: 1;
pointer-events: auto;
}
.dropzone-1 .dz-preview .dz-error-message {
pointer-events: none;
z-index: 1000;
position: absolute;
display: block;
display: none;
opacity: 0;
-webkit-transition: opacity 0.3s ease;
-moz-transition: opacity 0.3s ease;
-ms-transition: opacity 0.3s ease;
-o-transition: opacity 0.3s ease;
transition: opacity 0.3s ease;
border-radius: 8px;
font-size: 13px;
top: 130px;
left: -10px;
width: 140px;
background: #be2626;
background: linear-gradient(to bottom, #be2626, #a92222);
padding: 0.5em 1.2em;
color: white;
}
.dropzone-1 .dz-preview .dz-error-message:after {
content: '';
position: absolute;
top: -6px;
left: 64px;
width: 0;
height: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #be2626;
}
// custom styles
.dropzone-1 {
border-color: $primary !important;
border-style: dashed !important;
align-items: center;
justify-content: center;
display: flex;
background: rgba($primary, 0.1) !important;
}

@ -0,0 +1,11 @@
/* ERC721 media block */
.erc721-media {
display: flex;
justify-content: center;
max-height: 200px;
}
.erc721-media img {
height: 150px;
}
/* ERC721 media block end */

@ -0,0 +1,137 @@
$error-tablet-breakpoint: 768px;
// Block Not Found
.block-not-found {
display: flex;
flex-direction: column;
padding-bottom: 50px;
@media (min-width: $error-tablet-breakpoint) {
flex-direction: row;
align-items: center;
justify-content: center;
padding-top: 52px;
}
}
.block-not-found-img {
margin-bottom: 40px;
text-align: center;
@media (min-width: $error-tablet-breakpoint) {
margin-bottom: 0;
text-align: left;
}
img {
max-width: 100%;
height: auto;
}
}
.block-not-found-content {
text-align: center;
@media (min-width: $error-tablet-breakpoint) {
text-align: left;
padding-left: 52px;
max-width: 396px;
}
}
.error-title {
margin-bottom: 20px !important;
}
.error-descr {
display: block;
font-size: 14px;
color: #a3a9b5;
line-height: 1.714;
margin-bottom: 22px;
word-wrap: break-word;
}
.error-btn {
background: transparent;
display: inline-flex !important;
}
// TX Not Found
.tx-nf {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
padding-bottom: 50px;
@media (min-width: $error-tablet-breakpoint) {
flex-direction: row;
padding-top: 52px;
}
}
.tx-nf-content {
margin-top: 52px;
max-width: 700px;
@media (min-width: $error-tablet-breakpoint) {
margin-left: 90px;
margin-top: 0;
}
}
.tx-nf-blocks {
margin-bottom: 40px;
margin-top: 40px;
}
.tx-nf-block {
background-color: #fff;
box-shadow: 0px 0px 30px 0px rgba(202, 199, 226, 0.5);
padding: 17px 40px 17px 20px;
position: relative;
border-radius: 6px;
@media (min-width: $error-tablet-breakpoint) {
width: calc(50% - 20px);
}
}
.tx-nf-block {
.error-descr {
margin-bottom: 0;
}
& + .tx-nf-block {
margin-top: 30px;
@media (min-width: $error-tablet-breakpoint) {
margin-top: 0;
}
}
}
.tx-nf-blocks-row {
display: flex;
justify-content: space-between;
flex-direction: column;
@media (min-width: $error-tablet-breakpoint) {
flex-direction: row;
}
& + .tx-nf-blocks-row {
margin-top: 30px;
@media (min-width: $error-tablet-breakpoint) {
margin-top: 40px;
}
}
}
.tx-nf-number {
display: inline-block;
position: absolute;
top: -15px;
left: -15px;
width: 30px;
height: 30px;
border-radius: 15px;
background-color: $secondary;
box-shadow: 0px 3px 5px 0px rgba($secondary, 0.25);
color: #fff;
font-weight: 700;
font-size: 14px;
text-align: center;
line-height: 32px;
}

@ -0,0 +1,21 @@
.external-link-icon {
float: right;
margin-top: -1px;
& {
&.active,
&:hover,
&:focus {
path {
fill: $header-icon-color-hover;
}
}
}
}
.external-token-icon {
path {
fill: $header-icon-color-hover;
}
}

@ -0,0 +1,4 @@
.filter {
min-width: 100%;
transform: translate3d(0, 34px, 0px) !important;
}

@ -0,0 +1,55 @@
.fontawesome-icon {
background-color: $footer-text-color;
&.github {
-webkit-mask: url(../static/images/icons/fontawesome/github.svg) no-repeat center;
mask: url(../static/images/icons/fontawesome/github.svg) no-repeat center;
height: 22px;
width: 22px;
mask-size: 22px !important;
-webkit-mask-size: 22px !important;
}
&.twitter {
-webkit-mask: url(../static/images/icons/fontawesome/twitter.svg) no-repeat center;
mask: url(../static/images/icons/fontawesome/twitter.svg) no-repeat center;
height: 22px;
width: 22px;
mask-size: 22px !important;
-webkit-mask-size: 22px !important;
}
&.telegram {
-webkit-mask: url(../static/images/icons/fontawesome/telegram.svg) no-repeat center;
mask: url(../static/images/icons/fontawesome/telegram.svg) no-repeat center;
height: 22px;
width: 22px;
mask-size: 22px !important;
-webkit-mask-size: 22px !important;
}
&.bar-chart {
-webkit-mask: url(../static/images/icons/fontawesome/bar-chart.svg) no-repeat center;
mask: url(../static/images/icons/fontawesome/bar-chart.svg) no-repeat center;
height: 22px;
width: 22px;
mask-size: 22px !important;
-webkit-mask-size: 22px !important;
}
&.info-circle {
-webkit-mask: url(../static/images/icons/fontawesome/info-circle.svg) no-repeat center;
mask: url(../static/images/icons/fontawesome/info-circle.svg) no-repeat center;
height: 12px;
width: 12px;
mask-size: 12px !important;
-webkit-mask-size: 12px !important;
}
&.tag {
-webkit-mask: url(../static/images/icons/fontawesome/tag.svg) no-repeat center;
mask: url(../static/images/icons/fontawesome/tag.svg) no-repeat center;
height: 12px;
width: 12px;
mask-size: 12px !important;
-webkit-mask-size: 12px !important;
display: inline-block;
background-color: #212121;
margin-bottom: -2px;
}
}

@ -0,0 +1,121 @@
$footer-background-color: $secondary !default;
$footer-title-color: #fff !default;
$footer-text-color: rgba(#fff, 0.7) !default;
$footer-link-color: $footer-text-color !default;
$footer-item-disc-color: $primary !default;
$footer-social-icon-color: $footer-text-color !default;
$footer-logo-height: 28px !default;
$footer-logo-width: auto !default;
.footer {
background: $footer-background-color;
color: $footer-text-color;
font-size: 12px;
line-height: 1.67;
margin: 0;
padding: 40px 0;
position: relative;
@media (max-width: $breakpoint-md) {
width: 100%;
}
}
.footer-logo-row {
margin-bottom: 30px;
}
.footer-logo {
max-height: $footer-logo-height;
width: $footer-logo-width;
}
.footer-info-text {
margin: 0 0 25px;
padding: 0 20px 0 0;
}
.footer-social-icons {
align-items: center;
display: flex;
margin: 0 0 25px;
}
.footer-social-icon {
color: $footer-social-icon-color;
font-size: 22px;
margin-right: 15px;
text-decoration: none;
transition: $transition-cont;
&:hover {
color: #fff;
}
&:focus {
color: darken($footer-text-color, 5);
}
&:last-child {
margin-right: 0;
}
}
.footer-link {
color: $footer-link-color;
&:hover {
color: $footer-link-color;
text-decoration: underline;
}
}
.footer-list {
padding-top: 0;
h3 {
color: $footer-title-color;
font-size: 14px;
font-weight: 300;
line-height: 1.4;
margin: 0 0 15px;
}
ul {
list-style-type: none;
margin: 0 0 25px;
padding: 0;
li {
align-items: center;
display: flex;
line-height: 2.5;
padding: 0;
a {
transition: $transition-cont;
&:hover {
text-decoration: none;
color: #fff;
}
&:focus {
color: darken($footer-text-color, 5);
}
}
&::before {
background-color: $footer-item-disc-color;
border-radius: 50%;
content: "";
display: block;
height: 6px;
margin: 0 10px 0 0;
width: 6px;
}
}
}
}
.footer-brand {
text-decoration: none !important;
}

@ -0,0 +1,152 @@
$form-control-border-color: #e2e5ec !default;
$form-control-border-color-active: $primary !default;
.form-control {
border-color: $form-control-border-color;
border-radius: 0;
font-size: 14px;
&.border-rounded {
border-radius: 4px;
}
&:focus {
border-color: $form-control-border-color-active;
box-shadow: none;
}
&.n-b-r {
border-right: none;
}
}
.form-p {
color: #a3a9b5;
font-size: 12px;
font-weight: normal;
line-height: 1.8;
.i-tooltip {
display: inline;
margin-left: 3px;
}
.link-dotted {
border-bottom-width: 1px;
border-bottom-style: dotted;
cursor: pointer;
text-decoration: none;
}
.text-dark {
color: #333;
}
&.m-b-0 {
margin-bottom: 0;
}
&.m-b-0-7 {
margin-bottom: 0.7rem;
}
}
.input-group-prepend.last {
.input-group-text {
background: none;
border-color: $form-control-border-color;
border-left: none;
color: #a3a9b5;
font-size: 14px;
transition: $input-transition;
}
}
.form-control:focus ~ .input-group-prepend.last {
.input-group-text {
border-color: $form-control-border-color-active;
}
}
.input-group.input-status-error {
input {
border-color: #FF7884 !important;
border-radius: 2px 2px 0 0;
}
.input-group-prepend {
margin-right: 0;
}
.input-group-prepend.last {
.input-group-text {
border-color: #FF7884;
border-radius: 0 2px 0 0;
}
}
.input-group-message {
width: 100%;
padding: 10px;
color: white;
background: #FF7884;
border-radius: 0 0 2px 2px;
.link-helptip {
border-bottom-width: 1px;
border-bottom-style: dotted;
color: inherit;
cursor: help;
text-decoration: none;
}
}
}
.form-buttons {
[class*="btn-"] {
margin-bottom: 20px;
&:last-child {
margin-bottom: 0;
}
}
}
.tokens-list-search-input-outer-container {
display: flex;
@include media-breakpoint-down(md) {
display: block;
}
}
.tokens-list-search-input-container {
float: right;
margin-left: auto;
position: relative;
@include media-breakpoint-down(md) {
width: 100%;
margin-bottom: 20px;
}
}
.tokens-list-search-input-container.tokens:before {
bottom: 5px;
}
.search-input {
background: url("data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2016%2017%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2217%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%237DD79F%22%20fill-rule%3D%22evenodd%22%20d%3D%22M15.713%2015.727a.982.982%200%200%201-1.388%200l-2.289-2.29C10.773%2014.403%209.213%2015%207.5%2015A7.5%207.5%200%201%201%2015%207.5c0%201.719-.602%203.284-1.575%204.55l2.288%202.288a.983.983%200%200%201%200%201.389zM7.5%202a5.5%205.5%200%201%200%200%2011%205.5%205.5%200%201%200%200-11z%22%2F%3E%0A%3C%2Fsvg%3E") no-repeat 20px 20px;
background-position: left;
background-position-x: 10px;
padding-left: 35px;
}
.tokens-list-search-input {
height: 40px;
width: 300px;
@include media-breakpoint-down(md) {
width: 100%;
}
padding: 10px 10px 10px 35px;
outline: none;
}

@ -0,0 +1,17 @@
//replace the default background color from highlightjs
.hljs {
background: $gray-100;
}
.line-numbers {
[data-line-number] {
&:before {
content: attr(data-line-number);
display: inline-block;
border-right: 1px solid $gray-400;
padding: 0 0.5em;
margin-right: 0.5em;
color: $gray-600;
}
}
}

@ -0,0 +1,27 @@
$i-tooltip-background: #a3a9b5 !default;
$i-tooltip-info: #fff !default;
$i-tooltip-background-active: $primary !default;
.i-tooltip {
display: block;
height: 16px;
width: 16px;
.i-tooltip-circle {
fill: $i-tooltip-background;
}
.i-tooltip-info {
fill: $i-tooltip-info;
}
&:hover {
.i-tooltip-circle {
fill: $i-tooltip-background-active;
}
}
&.ds-inline {
display: inline;
}
}

@ -0,0 +1,11 @@
.i-tooltip-2 {
color: $i-tooltip-background;
&:hover {
color: $i-tooltip-background-active;
}
}
.color-inherit {
color: inherit;
}

@ -0,0 +1,36 @@
.icon-links {
display: flex;
flex-direction: row;
align-items: center;
}
.icon-link {
align-items: center;
background-color: $gray-200;
border-radius: 50%;
border: none;
color: $text-muted;
cursor: pointer;
display: inline-flex;
height: 2rem;
justify-content: center;
margin: 0 0.25rem;
transition: all 0.1s ease;
width: 2rem;
&:hover {
background-color: darken($primary, 20%);
color: $white;
text-decoration: none;
}
&.icon-link-primary {
color: $footer-text-color;
background-color: rgba($white, 0.25);
&:hover {
background-color: $white;
color: $primary;
}
}
}

@ -0,0 +1,11 @@
/* ERC721 media block */
.inventory-erc721-media {
display: flex;
justify-content: center;
max-height: 50px;
}
.inventory-erc721-media img {
height: 50px;
}
/* ERC721 media block end */

@ -0,0 +1,104 @@
.bs-label {
display: inline-block;
padding: 0 5px;
background: #f5f6fa;
color: #77838f;
border-radius: 5px;
&.large {
font-size: 14px;
}
font-size: 12px;
padding: 5px;
line-height: normal;
&.right {
margin-left: auto;
float: right;
}
&.omni {
background: #6ca1e2;
color: #fff;
}
&.destination-eth {
background: #253358;
color: #fff;
}
&.destination-bsc {
background: #e7b941;
color: #fff;
}
&.destination-rinkeby {
background: #153550;
color: #fff;
}
&.bridged {
background: #70aee3;
color: #fff;
}
&.validator {
background: $primary;
color: #fff;
}
&.secondary {
background: $secondary;
color: #fff;
}
&.method {
color: #1e2022;
}
&.from-dropdown {
margin-top: -3px;
}
&.success {
background: rgba(40, 167, 69, 0.2);
color: rgb(40, 167, 69);
}
}
.confirmations-label {
position: relative;
padding-left: 1.15rem;
border-top-right-radius: .25rem;
border-bottom-right-radius: .25rem;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
padding-right: 10px;
}
.confirmations-label:after {
position: absolute;
left: 0;
top: 0;
content: "";
border-top: .9rem solid transparent;
border-bottom: .9rem solid transparent;
border-left: .9rem solid #fff;
}
.index-label {
position: relative;
padding-right: .3rem;
border-top-left-radius: .25rem;
border-bottom-left-radius: .25rem;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
background: #f5f6fa;
color: #77838f;
padding: .2rem .5rem;
}
.index-label:after {
position: absolute;
left: 100%;
top: 0;
content: "";
border-top: .8rem solid transparent;
border-bottom: .8rem solid transparent;
border-left: .8rem solid rgba(245, 246, 250, 1);
}
.testnet-label {
background-color: transparent;
border: 1px solid #828ba0;
color: #828ba0;
}

@ -0,0 +1,87 @@
// ATTRIBUTION
//
// Author: Tobias Ahlin (tobiasahlin)
//
// SpinKit - Simple loading spinners animated with CSS.
// https://github.com/tobiasahlin/SpinKit
.loading-spinner {
margin: auto 1rem;
width: 40px;
height: 40px;
position: relative;
}
.loading-spinner-block-1,
.loading-spinner-block-2 {
background-color: currentColor;
width: 12px;
height: 12px;
position: absolute;
top: 0;
left: 0;
border-radius: $border-radius;
animation: loading-spinner 1.8s infinite ease-in-out;
}
.loading-spinner-block-2 {
animation-delay: -0.9s;
}
@keyframes loading-spinner {
25% {
transform: translateX(22px) rotate(-90deg) scale(0.5);
}
50% {
transform: translateX(22px) translateY(22px) rotate(-179deg);
}
50.1% {
transform: translateX(22px) translateY(22px) rotate(-180deg);
}
75% {
transform: translateX(0px) translateY(22px) rotate(-270deg) scale(0.5);
}
100% {
transform: rotate(-360deg);
}
}
.loading-spinner-small {
display: inline-block;
position: relative;
top: -0.125em;
margin: auto 0.5em auto 0;
width: 1em;
height: 1em;
.loading-spinner-block-1,
.loading-spinner-block-2 {
width: 0.5em;
height: 0.5em;
animation: loading-spinner-small 1.8s infinite ease-in-out;
}
.loading-spinner-block-2 {
animation-delay: -0.9s;
}
}
@keyframes loading-spinner-small {
25% {
transform: translateX(10px) rotate(-90deg) scale(0.5);
}
50% {
transform: translateX(10px) translateY(10px) rotate(-179deg);
}
50.1% {
transform: translateX(10px) translateY(10px) rotate(-180deg);
}
75% {
transform: translateX(0px) translateY(10px) rotate(-270deg) scale(0.5);
}
100% {
transform: rotate(-360deg);
}
}

@ -0,0 +1,69 @@
.logs-topbar {
padding-bottom: 30px;
@media (min-width: 600px) {
display: flex;
justify-content: space-between;
}
.pagination-container.position-top {
padding-top: 0 !important;
}
}
.logs-search {
display: flex;
position: relative;
flex: 2;
@media (max-width: 599px) {
margin-bottom: 30px;
width: 100%;
}
}
.logs-search-input, .logs-search-btn, .logs-search-btn-cancel {
height: 24px;
background-color: #f5f6fa;
border: 1px solid #f5f6fa;
color: #333;
border-radius: 2px;
outline: none;
font-family: Nunito, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 12px;
font-weight: 600;
-webkit-appearance: none;
}
.logs-search-input {
padding-left: 6px;
display: inline-flex;
flex-grow: 2;
min-width: 160px;
font-weight: 300 !important;
&::placeholder {
color: #a3a9b5;
font-weight: 300 !important;
}
}
.logs-search-btn {
margin-left: 6px;
color: #a3a9b5;
transition: .1s ease-in;
cursor: pointer;
&:hover {
background-color: $primary;
color: #fff;
border-color: $primary;
}
}
.logs-search-btn-cancel {
color: #a3a9b5;
cursor: pointer;
transition: .1s ease-in;
position: absolute;
top: 0;
right: 56px;
&:hover {
color: #333;
}
}

@ -0,0 +1,25 @@
$me-tooltip-background: #f5f6fa !default;
$me-tooltip-background-active: $primary !default;
$me-tooltip-text: #a3a9b5 !default;
$me-tooltip-text-active: #fff !default;
.me-tooltip {
display: block;
height: 16px;
width: 24px;
border-radius: 8px;
background-color: $me-tooltip-background;
color: $me-tooltip-text;
cursor: pointer;
font-size: 10px;
line-height: 16px;
font-weight: bold;
text-align: center;
position: relative;
top: 2px;
&:hover {
background-color: $me-tooltip-background-active;
color: $me-tooltip-text-active;
}
}

@ -0,0 +1,110 @@
.modal-backdrop {
background-color: $modal-overlay-color;
&.show {
opacity: 1;
}
}
.modal-header {
border-bottom: none;
padding: #{$modal-vertical-padding} #{$modal-horizontal-padding};
}
.modal-header-group {
display: inline-flex;
margin: 0 auto;
}
.close.close-modal{
left: auto;
opacity: 1;
position: absolute;
right: -35px;
top: -35px;
outline: none !important;
path {
fill: #F6F7F9;
}
}
.close {
outline: none !important;
}
.modal-body {
padding: 0 #{$modal-horizontal-padding} #{$modal-vertical-padding};
}
.modal-title {
color: #333;
font-size: 18px;
font-weight: normal;
text-align: left;
white-space: normal;
word-break: break-word;
.centered {
margin: 0 auto;
}
}
.modal-content {
border-radius: $modal-border-radius;
position: relative;
.btn-primary {
box-shadow: none !important;
background-color: $btn-line-color;
border: 1px solid $btn-line-color;
&:hover {
background-color: $btn-line-color;
border-color: $btn-line-color;
}
&:focus,
&:active {
background-color: darken($btn-line-color, 10%) !important;
border-color: darken($btn-line-color, 10%) !important;
}
}
}
.modal-fullwidth-xs {
@include media-breakpoint-down(xs) {
padding-right: 0 !important;
.modal-dialog {
max-width: initial;
min-width: initial;
margin: 0.5rem 0;
}
.modal-content {
border-radius: 0;
> div {
border-radius: 0;
}
}
.close.close-modal {
right: 10px;
top: 5px;
path {
fill: #a3a9b5;
}
}
.modal-bottom-disclaimer {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
}
}
@media (min-width: 576px) {
.modal-dialog {
max-width: 530px !important;
}
}

@ -0,0 +1,140 @@
.modal-stake {
max-width: 100%;
width: 560px;
@include media-breakpoint-down(sm) {
margin-left: auto;
margin-right: auto;
}
@include media-breakpoint-down(xs) {
width: 100%;
}
}
.modal-stake-move {
max-width: 740px;
min-width: 740px;
width: 100%;
@include media-breakpoint-down(sm) {
margin-left: auto;
margin-right: auto;
}
}
.modal-stake-three-cols {
display: grid;
grid-template-rows: [row1-start] auto [row2-start] auto [row3-start] auto [row3-end];
grid-template-columns: [col1-start] auto [col2-start] auto [col3-start] auto [col3-end];
> div {
grid-column: col2-start;
}
.modal-stake-left {
grid-column: col1-start;
grid-row: row1-start / row3-end;
}
.modal-stake-right {
grid-column: col3-start;
grid-row: row1-start / row3-end;
}
@include media-breakpoint-down(xs) {
grid-template-columns: [col1-start] auto [col1-end];
grid-template-rows: auto;
> div {
grid-column: col1-start;
}
.modal-stake-left {
width: 100%;
grid-column: col1-start;
grid-row: 3;
}
.modal-stake-right {
grid-column: col1-start;
grid-row: 4;
}
.stakes-progress {
width: auto;
padding-top: 15px;
padding-bottom: 15px;
.stakes-progress-graph {
float: left;
width: 130px;
margin-right: 15px;
}
.stakes-progress-info-title {
float: left;
margin-right: 15px;
}
.stakes-progress-info {
margin-bottom: 15px;
}
}
}
}
.modal-stake-two-cols {
display: grid;
grid-template-rows: [row1-start] auto [row2-start] auto [row3-start] auto [row3-end];
grid-template-columns: [col1-start] auto [col2-start] 190px [col2-end];
> div {
grid-column: col1-start;
}
.modal-stake-right {
grid-column: col2-start;
grid-row: row1-start / row3-end;
}
@include media-breakpoint-down(xs) {
grid-template-columns: [col1-start] auto [col1-end];
grid-template-rows: auto;
.modal-stake-right {
grid-column: col1-start;
grid-row: 3;
}
.stakes-progress {
width: auto;
padding-top: 15px;
padding-bottom: 15px;
.stakes-progress-graph {
float: left;
width: 130px;
margin-right: 15px;
}
.stakes-progress-info-title {
float: left;
margin-right: 15px;
}
.stakes-progress-info {
margin-bottom: 15px;
}
}
}
}
.modal-stake-left {
flex-shrink: 0;
height: 100%;
padding: $modal-vertical-padding $modal-horizontal-padding;
width: 190px;
height: 100%;
border-right: 1px solid $base-border-color;
}

@ -0,0 +1,103 @@
$modal-status-graph-error: #ff0d51 !default;
$modal-status-graph-warning: #ff8502 !default;
$modal-status-graph-success: $primary !default;
$modal-status-graph-question: #329ae9 !default;
.modal-status {
max-width: 100%;
width: 300px;
@include media-breakpoint-down(sm) {
margin-left: auto;
margin-right: auto;
}
}
.modal-status-graph {
align-items: center;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
display: flex;
height: 135px;
justify-content: center;
&-error {
background-color: $modal-status-graph-error;
}
&-warning {
background-color: $modal-status-graph-warning;
}
&-success {
background-color: $modal-status-graph-success;
}
&-question {
background-color: $modal-status-graph-question;
}
svg {
margin-top: 15px;
}
}
.modal-status-body {
align-items: center;
display: flex;
flex-direction: column;
justify-content: center;
padding: #{$modal-vertical-padding} #{$modal-horizontal-padding};
}
.modal-status-title {
color: #333;
font-size: 18px;
font-weight: normal;
line-height: 1.2;
margin: 0 0 15px;
text-align: center;
}
.modal-status-text {
color: #a3a9b5;
font-size: 12px;
font-weight: normal;
line-height: 1.5;
margin: 0 0 25px;
text-align: center;
&.m-b-0 {
margin-bottom: 0;
}
.link-helptip {
border-bottom-width: 1px;
border-bottom-style: dotted;
color: inherit;
cursor: help;
text-decoration: none;
}
}
.modal-status-button-wrapper {
display: flex;
justify-content: space-between;
width: 100%;
.btn-line {
flex-grow: 1;
margin-right: 20px;
border-color: $primary;
color: $primary;
&:hover {
background-color: $primary;
color: $additional-font;
}
&:last-child {
margin-right: 0;
}
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save