diff --git a/.circleci/config.yml b/.circleci/config.yml index 92a2b1d9e50f..cbb673207317 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -122,6 +122,7 @@ jobs: - mix.exs - mix.lock - appspec.yml + - rel check_formatted: docker: # Ensure .tool-versions matches @@ -279,6 +280,32 @@ jobs: name: Jest command: ./node_modules/.bin/jest working_directory: apps/block_scout_web/assets + release: + docker: + # Ensure .tool-versions matches + - image: circleci/elixir:1.7.2 + environment: + MIX_ENV: prod + + working_directory: ~/app + + steps: + - attach_workspace: + at: . + + - run: mix local.hex --force + - run: mix local.rebar --force + - run: mix release --verbose --env prod + - 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 @@ -561,6 +588,9 @@ workflows: - jest: requires: - build + - release: + requires: + - build - sobelow: requires: - build diff --git a/.credo.exs b/.credo.exs index ceb9421811a2..f7c4edb32a83 100644 --- a/.credo.exs +++ b/.credo.exs @@ -75,8 +75,9 @@ # Priority values are: `low, normal, high, higher` # {Credo.Check.Design.AliasUsage, - excluded_namespaces: ~w(Block Blocks Import Socket Task), - excluded_lastnames: ~w(Address DateTime Exporter Fetcher Full Instrumenter Monitor Name Number Repo Time Unit), + excluded_namespaces: ~w(Block Blocks Import 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 diff --git a/README.md b/README.md index f201753977b1..9b08f7c246fc 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@
Blockchain Explorer for inspecting and analyzing EVM Chains.
<%= gettext "Showing 250 addresses of" %> - <%= Cldr.Number.to_string!(@address_estimated_count, format: "#,###") %> + <%= Cldr.Number.to_string!(@address_count, format: "#,###") %> <%= gettext "total addresses with a balance" %>
<%= for {{address, tx_count}, index} <- Enum.with_index(@address_tx_count_pairs, 1) do %> - <%= render "_tile.html", + <%= render "_tile.html", address: address, index: index, exchange_rate: @exchange_rate, total_supply: @total_supply, tx_count: tx_count, - validation_count: validation_count(address) %> + validation_count: validation_count(address) %> <% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/_coin_balances.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/_coin_balances.html.eex new file mode 100644 index 000000000000..e62f87dde76d --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/_coin_balances.html.eex @@ -0,0 +1,24 @@ +<%= text_to_html(@address.smart_contract.contract_source_code, wrapper_tag: :span, insert_brs: false) %>
-
+ <%= for {line, number} <- contract_lines_with_index(@address.smart_contract.contract_source_code) do %><%= line %><% end %>
<%= format_smart_contract_abi(@address.smart_contract.abi) %>+<%= format_smart_contract_abi(@address.smart_contract.abi) %>
<%= @address.contract_code %>
+ <%= @address.contract_code %>