Merge branch 'master' into ab-set-timeout-on-loading-messages

pull/2324/head
Victor Baranov 5 years ago committed by GitHub
commit 02c6a38e5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 38
      .circleci/config.yml
  2. 6
      .dialyzer-ignore
  3. 2
      .tool-versions
  4. 10
      CHANGELOG.md
  5. 4
      apps/block_scout_web/assets/css/components/_footer.scss
  6. 10
      apps/block_scout_web/assets/css/components/_network-selector.scss
  7. 4
      apps/block_scout_web/assets/webpack.config.js
  8. 4
      apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex
  9. 6
      apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/eth_controller.ex
  10. 28
      apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex
  11. 2
      apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex
  12. 2
      apps/block_scout_web/lib/block_scout_web/templates/api_docs/eth_rpc.html.eex
  13. 2
      apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex
  14. 2
      apps/block_scout_web/mix.exs
  15. 10
      apps/block_scout_web/priv/gettext/default.pot
  16. 10
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po
  17. 18
      apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/rolling_window.ex
  18. 7
      apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/transport.ex
  19. 2
      apps/ethereum_jsonrpc/mix.exs
  20. 5
      apps/ethereum_jsonrpc/test/ethereum_jsonrpc/rolling_window_test.exs
  21. 2
      apps/explorer/config/config.exs
  22. 39
      apps/explorer/lib/explorer/chain.ex
  23. 4
      apps/explorer/lib/explorer/chain/import/runner/transactions.ex
  24. 2
      apps/explorer/mix.exs
  25. 25
      apps/explorer/priv/compile_solc.js
  26. 50
      apps/explorer/test/explorer/chain/import/runner/transactions_test.exs
  27. 20
      apps/explorer/test/explorer/smart_contract/solidity/code_compiler_test.exs
  28. 2
      apps/indexer/mix.exs
  29. 2
      docs/requirements.md
  30. 17
      mix.exs

@ -3,7 +3,7 @@ jobs:
build: build:
docker: docker:
# Ensure .tool-versions matches # Ensure .tool-versions matches
- image: circleci/elixir:1.8.1-node-browsers - image: circleci/elixir:1.9.0-node-browsers
environment: environment:
MIX_ENV: test MIX_ENV: test
# match POSTGRES_PASSWORD for postgres image below # match POSTGRES_PASSWORD for postgres image below
@ -129,7 +129,7 @@ jobs:
check_formatted: check_formatted:
docker: docker:
# Ensure .tool-versions matches # Ensure .tool-versions matches
- image: circleci/elixir:1.8.1 - image: circleci/elixir:1.9.0
environment: environment:
MIX_ENV: test MIX_ENV: test
@ -143,7 +143,7 @@ jobs:
credo: credo:
docker: docker:
# Ensure .tool-versions matches # Ensure .tool-versions matches
- image: circleci/elixir:1.8.1 - image: circleci/elixir:1.9.0
environment: environment:
MIX_ENV: test MIX_ENV: test
@ -177,7 +177,7 @@ jobs:
dialyzer: dialyzer:
docker: docker:
# Ensure .tool-versions matches # Ensure .tool-versions matches
- image: circleci/elixir:1.8.1 - image: circleci/elixir:1.9.0
environment: environment:
MIX_ENV: test MIX_ENV: test
@ -191,9 +191,9 @@ jobs:
- restore_cache: - restore_cache:
keys: keys:
- v7-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.lock" }}
- v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} - v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }}
- v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} - v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}
- run: - run:
name: Unpack PLT cache name: Unpack PLT cache
@ -213,15 +213,15 @@ jobs:
cp ~/.mix/dialyxir*.plt plts/ cp ~/.mix/dialyxir*.plt plts/
- save_cache: - save_cache:
key: v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }} key: v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.lock" }}
paths: paths:
- plts - plts
- save_cache: - save_cache:
key: v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }} key: v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}-{{ checksum "mix.exs" }}
paths: paths:
- plts - plts
- save_cache: - save_cache:
key: v7-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }} key: v8-mix-dialyzer-{{ checksum "OTP_VERSION.lock" }}-{{ checksum "ELIXIR_VERSION.lock" }}
paths: paths:
- plts - plts
@ -247,7 +247,7 @@ jobs:
gettext: gettext:
docker: docker:
# Ensure .tool-versions matches # Ensure .tool-versions matches
- image: circleci/elixir:1.8.1 - image: circleci/elixir:1.9.0
environment: environment:
MIX_ENV: test MIX_ENV: test
@ -286,7 +286,7 @@ jobs:
release: release:
docker: docker:
# Ensure .tool-versions matches # Ensure .tool-versions matches
- image: circleci/elixir:1.8.1 - image: circleci/elixir:1.9.0
environment: environment:
MIX_ENV: prod MIX_ENV: prod
@ -298,7 +298,7 @@ jobs:
- run: mix local.hex --force - run: mix local.hex --force
- run: mix local.rebar --force - run: mix local.rebar --force
- run: mix release --verbose --env prod - run: MIX_ENV=prod mix release
- run: - run:
name: Collecting artifacts name: Collecting artifacts
command: | command: |
@ -312,7 +312,7 @@ jobs:
sobelow: sobelow:
docker: docker:
# Ensure .tool-versions matches # Ensure .tool-versions matches
- image: circleci/elixir:1.8.1 - image: circleci/elixir:1.9.0
environment: environment:
MIX_ENV: test MIX_ENV: test
@ -336,7 +336,7 @@ jobs:
test_geth_http_websocket: test_geth_http_websocket:
docker: docker:
# Ensure .tool-versions matches # Ensure .tool-versions matches
- image: circleci/elixir:1.8.1-node-browsers - image: circleci/elixir:1.9.0-node-browsers
environment: environment:
MIX_ENV: test MIX_ENV: test
# match POSTGRES_PASSWORD for postgres image below # match POSTGRES_PASSWORD for postgres image below
@ -390,7 +390,7 @@ jobs:
test_geth_mox: test_geth_mox:
docker: docker:
# Ensure .tool-versions matches # Ensure .tool-versions matches
- image: circleci/elixir:1.8.1-node-browsers - image: circleci/elixir:1.9.0-node-browsers
environment: environment:
MIX_ENV: test MIX_ENV: test
# match POSTGRES_PASSWORD for postgres image below # match POSTGRES_PASSWORD for postgres image below
@ -444,7 +444,7 @@ jobs:
test_parity_http_websocket: test_parity_http_websocket:
docker: docker:
# Ensure .tool-versions matches # Ensure .tool-versions matches
- image: circleci/elixir:1.8.1-node-browsers - image: circleci/elixir:1.9.0-node-browsers
environment: environment:
MIX_ENV: test MIX_ENV: test
# match POSTGRES_PASSWORD for postgres image below # match POSTGRES_PASSWORD for postgres image below
@ -498,7 +498,7 @@ jobs:
test_parity_mox: test_parity_mox:
docker: docker:
# Ensure .tool-versions matches # Ensure .tool-versions matches
- image: circleci/elixir:1.8.1-node-browsers - image: circleci/elixir:1.9.0-node-browsers
environment: environment:
MIX_ENV: test MIX_ENV: test
# match POSTGRES_PASSWORD for postgres image below # match POSTGRES_PASSWORD for postgres image below
@ -552,7 +552,7 @@ jobs:
coveralls_merge: coveralls_merge:
docker: docker:
# Ensure .tool-versions matches # Ensure .tool-versions matches
- image: circleci/elixir:1.8.1 - image: circleci/elixir:1.9.0
environment: environment:
MIX_ENV: test MIX_ENV: test

@ -2,8 +2,12 @@
:0: Unknown function 'Elixir.ExUnit.CaseTemplate':'__proxy__'/2 :0: Unknown function 'Elixir.ExUnit.CaseTemplate':'__proxy__'/2
:0: Unknown type 'Elixir.Map':t/0 :0: Unknown type 'Elixir.Map':t/0
apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex:400: Function timestamp_to_datetime/1 has no local return apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex:400: Function timestamp_to_datetime/1 has no local return
lib/block_scout_web/views/layout_view.ex:174: The call 'Elixir.Poison.Parser':'parse!'(any(),#{'keys':='atoms!'}) will never return since the success typing is (binary() | maybe_improper_list(binary() | maybe_improper_list(any(),binary() | []) | byte(),binary() | []),[{atom(),_}]) -> 'false' | 'nil' | 'true' | binary() | ['false' | 'nil' | 'true' | binary() | [any()] | number() | map()] | number() | map() and the contract is (iodata(),'Elixir.Keyword':t()) -> t()
lib/explorer/repo/prometheus_logger.ex:8
lib/block_scout_web/views/layout_view.ex:175
lib/explorer/smart_contract/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: 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() 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()
apps/block_scout_web/lib/block_scout_web/views/layout_view.ex:175: The call 'Elixir.Poison.Parser':'parse!'(any(),#{'keys':='atoms!'}) will never return since the success typing is (binary() | maybe_improper_list(binary() | maybe_improper_list(any(),binary() | []) | byte(),binary() | []),[{atom(),_}]) -> 'false' | 'nil' | 'true' | binary() | ['false' | 'nil' | 'true' | binary() | [any()] | number() | map()] | number() | map() and the contract is (iodata(),'Elixir.Keyword':t()) -> t() apps/block_scout_web/lib/block_scout_web/views/layout_view.ex:175: The call 'Elixir.Poison.Parser':'parse!'(any(),#{'keys':='atoms!'}) will never return since the success typing is (binary() | maybe_improper_list(binary() | maybe_improper_list(any(),binary() | []) | byte(),binary() | []),[{atom(),_}]) -> 'false' | 'nil' | 'true' | binary() | ['false' | 'nil' | 'true' | binary() | [any()] | number() | map()] | number() | map() and the contract is (iodata(),'Elixir.Keyword':t()) -> t()
apps/explorer/lib/explorer/smart_contract/publisher_worker.ex:6: The pattern 'false' can never match the type 'true' apps/explorer/lib/explorer/smart_contract/publisher_worker.ex:6: The pattern 'false' can never match the type 'true'
apps/explorer/lib/explorer/smart_contract/publisher_worker.ex:6: The test 5 == 'infinity' can never evaluate to 'true' apps/explorer/lib/explorer/smart_contract/publisher_worker.ex:6: The test 5 == 'infinity' can never evaluate to 'true'

@ -1,3 +1,3 @@
elixir 1.8.1 elixir 1.9
erlang 21.0.4 erlang 21.0.4
nodejs 10.11.0 nodejs 10.11.0

@ -1,10 +1,16 @@
## Current ## Current
### Features ### Features
- [#2379](https://github.com/poanetwork/blockscout/pull/2379) - Disable network selector when is empty
- [#2360](https://github.com/poanetwork/blockscout/pull/2360) - add default evm version to smart contract verification
- [#2352](https://github.com/poanetwork/blockscout/pull/2352) - Fetch rewards in parallel with transactions
- [#2294](https://github.com/poanetwork/blockscout/pull/2294) - add healthy block period checking endpoint - [#2294](https://github.com/poanetwork/blockscout/pull/2294) - add healthy block period checking endpoint
- [#2324](https://github.com/poanetwork/blockscout/pull/2324) - set timeout for loading message on the main page - [#2324](https://github.com/poanetwork/blockscout/pull/2324) - set timeout for loading message on the main page
### Fixes ### Fixes
- [#2378](https://github.com/poanetwork/blockscout/pull/2378) - Page performance: exclude moment.js localization files except EN, remove unused css
- [#2368](https://github.com/poanetwork/blockscout/pull/2368) - add two columns of smart contract info
- [#2375](https://github.com/poanetwork/blockscout/pull/2375) - Update created_contract_code_indexed_at on transaction import conflict
- [#2346](https://github.com/poanetwork/blockscout/pull/2346) - Avoid fetching internal transactions of blocks that still need refetching - [#2346](https://github.com/poanetwork/blockscout/pull/2346) - Avoid fetching internal transactions of blocks that still need refetching
- [#2350](https://github.com/poanetwork/blockscout/pull/2350) - fix invalid User agent headers - [#2350](https://github.com/poanetwork/blockscout/pull/2350) - fix invalid User agent headers
- [#2345](https://github.com/poanetwork/blockscout/pull/2345) - do not override existing market records - [#2345](https://github.com/poanetwork/blockscout/pull/2345) - do not override existing market records
@ -19,6 +25,7 @@
- [#2326](https://github.com/poanetwork/blockscout/pull/2326) - fix nested constructor arguments - [#2326](https://github.com/poanetwork/blockscout/pull/2326) - fix nested constructor arguments
### Chore ### Chore
- [#2363](https://github.com/poanetwork/blockscout/pull/2363) - add parameters example for eth rpc
- [#2342](https://github.com/poanetwork/blockscout/pull/2342) - Upgrade Postgres image version in Docker setup - [#2342](https://github.com/poanetwork/blockscout/pull/2342) - Upgrade Postgres image version in Docker setup
- [#2325](https://github.com/poanetwork/blockscout/pull/2325) - Reduce function input to address' hash only where possible - [#2325](https://github.com/poanetwork/blockscout/pull/2325) - Reduce function input to address' hash only where possible
- [#2323](https://github.com/poanetwork/blockscout/pull/2323) - Group Explorer caches - [#2323](https://github.com/poanetwork/blockscout/pull/2323) - Group Explorer caches
@ -26,8 +33,8 @@
- [#2302](https://github.com/poanetwork/blockscout/pull/2302) - fix names for xDai source - [#2302](https://github.com/poanetwork/blockscout/pull/2302) - fix names for xDai source
- [#2289](https://github.com/poanetwork/blockscout/pull/2289) - Optional websockets for dev environment - [#2289](https://github.com/poanetwork/blockscout/pull/2289) - Optional websockets for dev environment
- [#2307](https://github.com/poanetwork/blockscout/pull/2307) - add GoJoy to README - [#2307](https://github.com/poanetwork/blockscout/pull/2307) - add GoJoy to README
- [#2293](https://github.com/poanetwork/blockscout/pull/2293) - remove request idle timeout configuration - [#2293](https://github.com/poanetwork/blockscout/pull/2293) - remove request idle timeout configuration
- [#2255](https://github.com/poanetwork/blockscout/pull/2255) - bump elixir version to 1.9.0
## 2.0.1-beta ## 2.0.1-beta
@ -114,6 +121,7 @@
### Chore ### Chore
- [#2127](https://github.com/poanetwork/blockscout/pull/2127) - use previouse chromedriver version - [#2127](https://github.com/poanetwork/blockscout/pull/2127) - use previouse chromedriver version
- [#2118](https://github.com/poanetwork/blockscout/pull/2118) - show only the last decompiled contract - [#2118](https://github.com/poanetwork/blockscout/pull/2118) - show only the last decompiled contract
- [#2255](https://github.com/poanetwork/blockscout/pull/2255) - upgrade elixir version to 1.9.0
- [#2256](https://github.com/poanetwork/blockscout/pull/2256) - use the latest version of chromedriver - [#2256](https://github.com/poanetwork/blockscout/pull/2256) - use the latest version of chromedriver
## 2.0.0-beta ## 2.0.0-beta

@ -61,10 +61,6 @@ $footer-logo-width: auto !default;
} }
} }
.footer-info {
padding-top: 1em;
}
.footer-link { .footer-link {
color: $footer-link-color; color: $footer-link-color;

@ -287,16 +287,6 @@ $network-selector-item-icon-dimensions: 30px !default;
} }
} }
.network-selector-load-more-container {
flex-shrink: 1;
padding: 0 $network-selector-horizontal-padding;
.btn-network-selector-load-more {
@include btn-line($btn-network-selector-load-more-background, $btn-network-selector-load-more-color);
width: 100%;
}
}
.network-selector-item-favorite { .network-selector-item-favorite {
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;

@ -1,6 +1,7 @@
const path = require('path'); const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin');
const { ContextReplacementPlugin } = require('webpack')
const glob = require("glob"); const glob = require("glob");
function transpileViewScript(file) { function transpileViewScript(file) {
@ -74,7 +75,8 @@ const appJs =
}, },
plugins: [ plugins: [
new ExtractTextPlugin('../css/app.css'), new ExtractTextPlugin('../css/app.css'),
new CopyWebpackPlugin([{ from: 'static/', to: '../' }]) new CopyWebpackPlugin([{ from: 'static/', to: '../' }]),
new ContextReplacementPlugin(/moment[\/\\]locale$/, /en/)
] ]
} }

@ -23,7 +23,8 @@ defmodule BlockScoutWeb.AddressTransactionController do
[token_transfers: :token] => :optional, [token_transfers: :token] => :optional,
[token_transfers: :to_address] => :optional, [token_transfers: :to_address] => :optional,
[token_transfers: :from_address] => :optional, [token_transfers: :from_address] => :optional,
[token_transfers: :token_contract_address] => :optional [token_transfers: :token_contract_address] => :optional,
:block => :required
} }
] ]
@ -34,7 +35,6 @@ defmodule BlockScoutWeb.AddressTransactionController do
{:ok, address} <- Chain.hash_to_address(address_hash, address_options, false) do {:ok, address} <- Chain.hash_to_address(address_hash, address_options, false) do
options = options =
@transaction_necessity_by_association @transaction_necessity_by_association
|> put_in([:necessity_by_association, :block], :required)
|> Keyword.merge(paging_options(params)) |> Keyword.merge(paging_options(params))
|> Keyword.merge(current_filter(params)) |> Keyword.merge(current_filter(params))

@ -12,12 +12,18 @@ defmodule BlockScoutWeb.API.RPC.EthController do
notes: """ notes: """
the `earliest` parameter will not work as expected currently, because genesis block balances the `earliest` parameter will not work as expected currently, because genesis block balances
are not currently imported are not currently imported
""",
example: """
{"id": 0, "jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x0000000000000000000000000000000000000007", "2"]}
""" """
}, },
"eth_getLogs" => %{ "eth_getLogs" => %{
action: :eth_get_logs, action: :eth_get_logs,
notes: """ notes: """
Will never return more than 1000 log entries. Will never return more than 1000 log entries.
""",
example: """
{"id": 0, "jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"address": "0x0000000000000000000000000000000000000026","topics": ["0x01"]}]}
""" """
} }
} }

@ -23,12 +23,22 @@
<%= if BlockScoutWeb.AddressView.smart_contract_verified?(@address) do %> <%= if BlockScoutWeb.AddressView.smart_contract_verified?(@address) do %>
<div class="mb-4"> <div class="mb-4">
<dl class="row"> <dl class="row">
<dt class="col-sm-4 col-md-2 text-muted"><%= gettext "Contract name:" %></dt> <dt class="col-md-2 text-muted"><%= gettext "Contract name:" %></dt>
<dd class="col-sm-8 col-md-10"><%= @address.smart_contract.name %></dd> <dd class="col-md-4"><%= @address.smart_contract.name %></dd>
<div class="d-none d-sm-block d-md-none"></br></br></div>
<div class="d-block d-sm-none"></br></br></div>
<dt class="col-md-2 text-muted"><%= gettext "Optimization enabled" %></dt>
<dd class="col-md-4"><%= format_optimization_text(@address.smart_contract.optimization) %></dd>
</dl> </dl>
<dl class="row"> <dl class="row">
<dt class="col-sm-4 col-md-2 text-muted"><%= gettext "Compiler version" %></dt> <dt class="col-md-2 text-muted"><%= gettext "Compiler version" %></dt>
<dd class="col-sm-8 col-md-10"><%= @address.smart_contract.compiler_version %></dd> <dd class="col-md-4"><%= @address.smart_contract.compiler_version %></dd>
<div class="d-none d-sm-block d-md-none"></br></br></div>
<div class="d-block d-sm-none"></br></br></div>
<%= if @address.smart_contract.optimization && @address.smart_contract.optimization_runs do %>
<dt class="col-md-2 text-muted"><%= gettext "Optimization runs" %></dt>
<dd class="col-md-4"><%= @address.smart_contract.optimization_runs %></dd>
<% end %>
</dl> </dl>
<%= if @address.smart_contract.evm_version do %> <%= if @address.smart_contract.evm_version do %>
<dl class="row"> <dl class="row">
@ -36,16 +46,6 @@
<dd class="col-sm-8 col-md-10"><%= @address.smart_contract.evm_version %></dd> <dd class="col-sm-8 col-md-10"><%= @address.smart_contract.evm_version %></dd>
</dl> </dl>
<% end %> <% end %>
<dl class="row">
<dt class="col-sm-4 col-md-2 text-muted"><%= gettext "Optimization enabled" %></dt>
<dd class="col-sm-8 col-md-10"><%= format_optimization_text(@address.smart_contract.optimization) %></dd>
</dl>
<%= if @address.smart_contract.optimization && @address.smart_contract.optimization_runs do %>
<dl class="row">
<dt class="col-sm-4 col-md-2 text-muted"><%= gettext "Optimization runs" %></dt>
<dd class="col-sm-8 col-md-10"><%= @address.smart_contract.optimization_runs %></dd>
</dl>
<% end %>
<%= if @address.smart_contract.constructor_arguments do %> <%= if @address.smart_contract.constructor_arguments do %>
<dl class="row"> <dl class="row">
<dt class="col-sm-4 col-md-2 text-muted"><%= gettext "Constructor arguments" %></dt> <dt class="col-sm-4 col-md-2 text-muted"><%= gettext "Constructor arguments" %></dt>

@ -50,7 +50,7 @@
<div class="smart-contract-form-group-inner-wrapper"> <div class="smart-contract-form-group-inner-wrapper">
<%= label :evm_version, :evm_version, gettext("EVM Version") %> <%= label :evm_version, :evm_version, gettext("EVM Version") %>
<div class="center-column"> <div class="center-column">
<%= select f, :evm_version, @evm_versions, class: "form-control border-rounded", selected: "petersburg", "aria-describedby": "evm-version-help-block" %> <%= select f, :evm_version, @evm_versions, class: "form-control border-rounded", selected: "default", "aria-describedby": "evm-version-help-block" %>
</div> </div>
<div class="smart-contract-form-group-tooltip">The EVM version the contract is written for. If the bytecode does not match the version, we try to verify using the latest EVM version. <a href="https://forum.poa.network/t/smart-contract-verification-evm-version-details/2318" target="_blank">EVM version details</a>.</div> <div class="smart-contract-form-group-tooltip">The EVM version the contract is written for. If the bytecode does not match the version, we try to verify using the latest EVM version. <a href="https://forum.poa.network/t/smart-contract-verification-evm-version-details/2318" target="_blank">EVM version details</a>.</div>
</div> </div>

@ -22,11 +22,13 @@
<tr> <tr>
<th>Supported Method</th> <th>Supported Method</th>
<th>Notes</th> <th>Notes</th>
<th>Parameters example</th>
</tr> </tr>
<%= for {method, info} <- Map.to_list(@documentation) do %> <%= for {method, info} <- Map.to_list(@documentation) do %>
<tr> <tr>
<td> <a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#<%= method %>"> <%= method %> </a> </td> <td> <a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#<%= method %>"> <%= method %> </a> </td>
<td> <%= Map.get(info, :notes, "N/A") %> </td> <td> <%= Map.get(info, :notes, "N/A") %> </td>
<td> <%= Map.get(info, :example, "N/A") %> </td>
</tr> </tr>
<% end %> <% end %>
</table> </table>

@ -82,7 +82,7 @@
</div> </div>
</li> </li>
<li class="nav-item dropdown nav-item-networks"> <li class="nav-item dropdown nav-item-networks">
<a class="nav-link topnav-nav-link dropdown-toggle active-icon js-show-network-selector <%= if dropdown_nets() == [], do: "disabled" %>" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a class="nav-link topnav-nav-link active-icon <%= if dropdown_nets() != [], do: "dropdown-toggle js-show-network-selector" %>" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="nav-link-icon"> <span class="nav-link-icon">
<%= render BlockScoutWeb.IconsView, "_active_icon.html" %> <%= render BlockScoutWeb.IconsView, "_active_icon.html" %>
</span> </span>

@ -15,7 +15,7 @@ defmodule BlockScoutWeb.Mixfile do
plt_add_deps: :transitive, plt_add_deps: :transitive,
ignore_warnings: "../../.dialyzer-ignore" ignore_warnings: "../../.dialyzer-ignore"
], ],
elixir: "~> 1.8", elixir: "~> 1.9",
elixirc_paths: elixirc_paths(Mix.env()), elixirc_paths: elixirc_paths(Mix.env()),
lockfile: "../../mix.lock", lockfile: "../../mix.lock",
package: package(), package: package(),

@ -230,7 +230,7 @@ msgid "Compiler"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:30 #: lib/block_scout_web/templates/address_contract/index.html.eex:34
msgid "Compiler version" msgid "Compiler version"
msgstr "" msgstr ""
@ -509,11 +509,13 @@ msgstr ""
#: lib/block_scout_web/templates/chain/show.html.eex:31 #: lib/block_scout_web/templates/chain/show.html.eex:31
#: lib/block_scout_web/templates/layout/app.html.eex:53 #: lib/block_scout_web/templates/layout/app.html.eex:53
#: lib/block_scout_web/views/address_view.ex:121 #: lib/block_scout_web/views/address_view.ex:121
#: lib/block_scout_web/views/address_view.ex:121
msgid "Market Cap" msgid "Market Cap"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:129 #: lib/block_scout_web/views/transaction_view.ex:129
#: lib/block_scout_web/views/transaction_view.ex:129
msgid "Max of" msgid "Max of"
msgstr "" msgstr ""
@ -577,7 +579,7 @@ msgid "OUT"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:40 #: lib/block_scout_web/templates/address_contract/index.html.eex:30
msgid "Optimization enabled" msgid "Optimization enabled"
msgstr "" msgstr ""
@ -1487,7 +1489,7 @@ msgid "Search by address, token symbol name, transaction hash, or block number"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:35 #: lib/block_scout_web/templates/address_contract/index.html.eex:45
#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:51 #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:51
msgid "EVM Version" msgid "EVM Version"
msgstr "" msgstr ""
@ -1518,7 +1520,7 @@ msgid "Decompiler version"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:45 #: lib/block_scout_web/templates/address_contract/index.html.eex:39
#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:83 #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:83
msgid "Optimization runs" msgid "Optimization runs"
msgstr "" msgstr ""

@ -230,7 +230,7 @@ msgid "Compiler"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:30 #: lib/block_scout_web/templates/address_contract/index.html.eex:34
msgid "Compiler version" msgid "Compiler version"
msgstr "" msgstr ""
@ -509,11 +509,13 @@ msgstr ""
#: lib/block_scout_web/templates/chain/show.html.eex:31 #: lib/block_scout_web/templates/chain/show.html.eex:31
#: lib/block_scout_web/templates/layout/app.html.eex:53 #: lib/block_scout_web/templates/layout/app.html.eex:53
#: lib/block_scout_web/views/address_view.ex:121 #: lib/block_scout_web/views/address_view.ex:121
#: lib/block_scout_web/views/address_view.ex:121
msgid "Market Cap" msgid "Market Cap"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:129 #: lib/block_scout_web/views/transaction_view.ex:129
#: lib/block_scout_web/views/transaction_view.ex:129
msgid "Max of" msgid "Max of"
msgstr "" msgstr ""
@ -577,7 +579,7 @@ msgid "OUT"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:40 #: lib/block_scout_web/templates/address_contract/index.html.eex:30
msgid "Optimization enabled" msgid "Optimization enabled"
msgstr "" msgstr ""
@ -1487,7 +1489,7 @@ msgid "Search by address, token symbol name, transaction hash, or block number"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:35 #: lib/block_scout_web/templates/address_contract/index.html.eex:45
#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:51 #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:51
msgid "EVM Version" msgid "EVM Version"
msgstr "" msgstr ""
@ -1518,7 +1520,7 @@ msgid "Decompiler version"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:45 #: lib/block_scout_web/templates/address_contract/index.html.eex:39
#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:83 #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:83
msgid "Optimization runs" msgid "Optimization runs"
msgstr "" msgstr ""

@ -209,14 +209,20 @@ defmodule EthereumJSONRPC.RollingWindow do
@doc """ @doc """
Display the raw contents of all windows for a given key. Display the raw contents of all windows for a given key.
""" """
@spec inspect(table :: atom, key :: term()) :: nonempty_list(non_neg_integer) @spec inspect(table :: atom, key :: term()) :: nonempty_list(non_neg_integer) | []
def inspect(table, key) do def inspect(table, key) do
case :ets.lookup(table, key) do case :ets.whereis(table) do
[{_, current_window, windows}] -> :undefined ->
[current_window | windows]
_ ->
[] []
tid ->
case :ets.lookup(tid, key) do
[{_, current_window, windows}] ->
[current_window | windows]
_ ->
[]
end
end end
end end
end end

@ -88,10 +88,6 @@ defmodule EthereumJSONRPC.Transport do
`%{"id" => ..., "error" => reason}`. The transport can also give any `term()` for `reason` if a more specific `%{"id" => ..., "error" => reason}`. The transport can also give any `term()` for `reason` if a more specific
reason is possible. reason is possible.
"""
@callback json_rpc(request, options) :: {:ok, result} | {:error, reason :: term()}
@doc """
Runs a batch of Remote Procedure Call (RPC) `request`s with `options`. Runs a batch of Remote Procedure Call (RPC) `request`s with `options`.
## Returns ## Returns
@ -99,8 +95,9 @@ defmodule EthereumJSONRPC.Transport do
* `{:ok, [response]}` unlike `json_rpc(request, options)`, the individual `t:response.t/0` are not unwrapped and it * `{:ok, [response]}` unlike `json_rpc(request, options)`, the individual `t:response.t/0` are not unwrapped and it
is the callers responsibility to extract the `t:result/0` or error `reason`. is the callers responsibility to extract the `t:result/0` or error `reason`.
* `{:error, reason}` an error that affects *all* `t:request/0`s, such as the batch as a whole being rejected. * `{:error, reason}` an error that affects *all* `t:request/0`s, such as the batch as a whole being rejected.
""" """
@callback json_rpc(request, options) :: {:ok, result} | {:error, reason :: term()}
@callback json_rpc(batch_request, options) :: {:ok, batch_response} | {:error, reason :: term()} @callback json_rpc(batch_request, options) :: {:ok, batch_response} | {:error, reason :: term()}
@doc """ @doc """

@ -15,7 +15,7 @@ defmodule EthereumJsonrpc.MixProject do
plt_add_apps: [:mix], plt_add_apps: [:mix],
ignore_warnings: "../../.dialyzer-ignore" ignore_warnings: "../../.dialyzer-ignore"
], ],
elixir: "~> 1.8", elixir: "~> 1.9",
elixirc_paths: elixirc_paths(Mix.env()), elixirc_paths: elixirc_paths(Mix.env()),
lockfile: "../../mix.lock", lockfile: "../../mix.lock",
preferred_cli_env: [ preferred_cli_env: [

@ -10,7 +10,10 @@ defmodule EthereumJSONRPC.RollingWindowTest do
setup do setup do
# We set `window_length` to a large time frame so that we can sweep manually to simulate # We set `window_length` to a large time frame so that we can sweep manually to simulate
# time passing # time passing
RollingWindow.start_link([table: @table, duration: :timer.minutes(120), window_count: 3], name: RollingWindow) {:ok, pid} =
RollingWindow.start_link([table: @table, duration: :timer.minutes(120), window_count: 3], name: RollingWindow)
on_exit(fn -> Process.exit(pid, :normal) end)
:ok :ok
end end

@ -12,7 +12,7 @@ config :explorer,
token_functions_reader_max_retries: 3, token_functions_reader_max_retries: 3,
allowed_evm_versions: allowed_evm_versions:
System.get_env("ALLOWED_EVM_VERSIONS") || System.get_env("ALLOWED_EVM_VERSIONS") ||
"homestead,tangerineWhistle,spuriousDragon,byzantium,constantinople,petersburg", "homestead,tangerineWhistle,spuriousDragon,byzantium,constantinople,petersburg,default",
include_uncles_in_average_block_time: include_uncles_in_average_block_time:
if(System.get_env("UNCLES_IN_AVERAGE_BLOCK_TIME") == "false", do: false, else: true), if(System.get_env("UNCLES_IN_AVERAGE_BLOCK_TIME") == "false", do: false, else: true),
healthy_blocks_period: System.get_env("HEALTHY_BLOCKS_PERIOD") || :timer.minutes(5) healthy_blocks_period: System.get_env("HEALTHY_BLOCKS_PERIOD") || :timer.minutes(5)

@ -222,25 +222,17 @@ defmodule Explorer.Chain do
Transaction.t() Transaction.t()
] ]
def address_to_transactions_with_rewards(address_hash, options \\ []) when is_list(options) do def address_to_transactions_with_rewards(address_hash, options \\ []) when is_list(options) do
direction = Keyword.get(options, :direction)
necessity_by_association = Keyword.get(options, :necessity_by_association, %{})
paging_options = Keyword.get(options, :paging_options, @default_paging_options) paging_options = Keyword.get(options, :paging_options, @default_paging_options)
transaction_hashes_from_token_transfers =
TokenTransfer.where_any_address_fields_match(direction, address_hash, paging_options)
transactions_list =
paging_options
|> fetch_transactions()
|> Transaction.where_transaction_matches(transaction_hashes_from_token_transfers, direction, address_hash)
|> join_associations(necessity_by_association)
|> Transaction.preload_token_transfers(address_hash)
|> Repo.all()
if Application.get_env(:block_scout_web, BlockScoutWeb.Chain)[:has_emission_funds] do if Application.get_env(:block_scout_web, BlockScoutWeb.Chain)[:has_emission_funds] do
rewards_task =
Task.async(fn ->
Reward.fetch_emission_rewards_tuples(address_hash, paging_options)
end)
address_hash address_hash
|> Reward.fetch_emission_rewards_tuples(paging_options) |> address_to_transactions_without_rewards(paging_options, options)
|> Enum.concat(transactions_list) |> Enum.concat(Task.await(rewards_task))
|> Enum.sort_by(fn item -> |> Enum.sort_by(fn item ->
case item do case item do
{%Reward{} = emission_reward, _} -> {%Reward{} = emission_reward, _} ->
@ -252,10 +244,25 @@ defmodule Explorer.Chain do
end) end)
|> Enum.take(paging_options.page_size) |> Enum.take(paging_options.page_size)
else else
transactions_list address_to_transactions_without_rewards(address_hash, paging_options, options)
end end
end end
defp address_to_transactions_without_rewards(address_hash, paging_options, options) do
direction = Keyword.get(options, :direction)
necessity_by_association = Keyword.get(options, :necessity_by_association, %{})
transaction_hashes_from_token_transfers =
TokenTransfer.where_any_address_fields_match(direction, address_hash, paging_options)
paging_options
|> fetch_transactions()
|> Transaction.where_transaction_matches(transaction_hashes_from_token_transfers, direction, address_hash)
|> join_associations(necessity_by_association)
|> Transaction.preload_token_transfers(address_hash)
|> Repo.all()
end
@spec address_to_logs(Hash.Address.t(), Keyword.t()) :: [Log.t()] @spec address_to_logs(Hash.Address.t(), Keyword.t()) :: [Log.t()]
def address_to_logs(address_hash, options \\ []) when is_list(options) do def address_to_logs(address_hash, options \\ []) when is_list(options) do
paging_options = Keyword.get(options, :paging_options) || %PagingOptions{page_size: 50} paging_options = Keyword.get(options, :paging_options) || %PagingOptions{page_size: 50}

@ -105,6 +105,7 @@ defmodule Explorer.Chain.Import.Runner.Transactions do
old_block_hash: transaction.block_hash, old_block_hash: transaction.block_hash,
block_number: fragment("EXCLUDED.block_number"), block_number: fragment("EXCLUDED.block_number"),
created_contract_address_hash: fragment("EXCLUDED.created_contract_address_hash"), created_contract_address_hash: fragment("EXCLUDED.created_contract_address_hash"),
created_contract_code_indexed_at: fragment("EXCLUDED.created_contract_code_indexed_at"),
cumulative_gas_used: fragment("EXCLUDED.cumulative_gas_used"), cumulative_gas_used: fragment("EXCLUDED.cumulative_gas_used"),
error: fragment("EXCLUDED.error"), error: fragment("EXCLUDED.error"),
from_address_hash: fragment("EXCLUDED.from_address_hash"), from_address_hash: fragment("EXCLUDED.from_address_hash"),
@ -128,10 +129,11 @@ defmodule Explorer.Chain.Import.Runner.Transactions do
], ],
where: where:
fragment( fragment(
"(EXCLUDED.block_hash, EXCLUDED.block_number, EXCLUDED.created_contract_address_hash, EXCLUDED.cumulative_gas_used, EXCLUDED.cumulative_gas_used, EXCLUDED.from_address_hash, EXCLUDED.gas, EXCLUDED.gas_price, EXCLUDED.gas_used, EXCLUDED.index, EXCLUDED.internal_transactions_indexed_at, EXCLUDED.input, EXCLUDED.nonce, EXCLUDED.r, EXCLUDED.s, EXCLUDED.status, EXCLUDED.to_address_hash, EXCLUDED.v, EXCLUDED.value) IS DISTINCT FROM (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", "(EXCLUDED.block_hash, EXCLUDED.block_number, EXCLUDED.created_contract_address_hash, EXCLUDED.created_contract_code_indexed_at, EXCLUDED.cumulative_gas_used, EXCLUDED.cumulative_gas_used, EXCLUDED.from_address_hash, EXCLUDED.gas, EXCLUDED.gas_price, EXCLUDED.gas_used, EXCLUDED.index, EXCLUDED.internal_transactions_indexed_at, EXCLUDED.input, EXCLUDED.nonce, EXCLUDED.r, EXCLUDED.s, EXCLUDED.status, EXCLUDED.to_address_hash, EXCLUDED.v, EXCLUDED.value) IS DISTINCT FROM (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
transaction.block_hash, transaction.block_hash,
transaction.block_number, transaction.block_number,
transaction.created_contract_address_hash, transaction.created_contract_address_hash,
transaction.created_contract_code_indexed_at,
transaction.cumulative_gas_used, transaction.cumulative_gas_used,
transaction.cumulative_gas_used, transaction.cumulative_gas_used,
transaction.from_address_hash, transaction.from_address_hash,

@ -15,7 +15,7 @@ defmodule Explorer.Mixfile do
plt_add_apps: ~w(ex_unit mix)a, plt_add_apps: ~w(ex_unit mix)a,
ignore_warnings: "../../.dialyzer-ignore" ignore_warnings: "../../.dialyzer-ignore"
], ],
elixir: "~> 1.8", elixir: "~> 1.9",
elixirc_paths: elixirc_paths(Mix.env()), elixirc_paths: elixirc_paths(Mix.env()),
lockfile: "../../mix.lock", lockfile: "../../mix.lock",
package: package(), package: package(),

@ -16,15 +16,7 @@ var solc = solc.setupMethods(compilerSnapshot);
var fs = require('fs'); var fs = require('fs');
var sourceCode = fs.readFileSync(sourceCodePath, 'utf8'); var sourceCode = fs.readFileSync(sourceCodePath, 'utf8');
const input = { var settings = {
language: 'Solidity',
sources: {
[newContractName]: {
content: sourceCode
}
},
settings: {
evmVersion: evmVersion,
optimizer: { optimizer: {
enabled: optimize == '1', enabled: optimize == '1',
runs: optimizationRuns runs: optimizationRuns
@ -37,7 +29,20 @@ const input = {
'*': ['*'] '*': ['*']
} }
} }
} }
if (evmVersion !== 'default') {
settings = Object.assign(settings, {evmVersion: evmVersion})
}
const input = {
language: 'Solidity',
sources: {
[newContractName]: {
content: sourceCode
}
},
settings: settings
} }

@ -0,0 +1,50 @@
defmodule Explorer.Chain.Import.Runner.TransactionsTest do
use Explorer.DataCase
alias Ecto.Multi
alias Explorer.Chain.{Address, Transaction}
alias Explorer.Chain.Import.Runner.Transactions
describe "run/1" do
test "transaction's created_contract_code_indexed_at is modified on update" do
%Address{hash: address_hash} = insert(:address)
transaction =
insert(:transaction,
created_contract_address_hash: address_hash,
created_contract_code_indexed_at: DateTime.utc_now()
)
assert not is_nil(transaction.created_contract_code_indexed_at)
non_indexed_transaction_params = %{
from_address_hash: transaction.from_address.hash,
gas: transaction.gas,
gas_price: transaction.gas_price,
hash: transaction.hash,
input: transaction.input,
nonce: transaction.nonce,
r: transaction.r,
s: transaction.s,
to_address_hash: transaction.to_address.hash,
v: transaction.v,
value: transaction.value,
created_contract_address_hash: address_hash,
created_contract_code_indexed_at: nil
}
assert {:ok, _} = run_transactions([non_indexed_transaction_params])
assert is_nil(Repo.get(Transaction, transaction.hash).created_contract_code_indexed_at)
end
end
defp run_transactions(changes_list) when is_list(changes_list) do
Multi.new()
|> Transactions.run(changes_list, %{
timeout: :infinity,
timestamps: %{inserted_at: DateTime.utc_now(), updated_at: DateTime.utc_now()}
})
|> Repo.transaction()
end
end

@ -53,6 +53,26 @@ defmodule Explorer.SmartContract.Solidity.CodeCompilerTest do
}} = response }} = response
end end
test "compiles smart contract with default evm version", %{contract_code_info: contract_code_info} do
optimize = true
response =
CodeCompiler.run(
name: contract_code_info.name,
compiler_version: contract_code_info.version,
code: contract_code_info.source_code,
optimize: optimize,
evm_version: "default"
)
assert {:ok,
%{
"abi" => _,
"bytecode" => _,
"name" => _
}} = response
end
test "compiles code with external libraries" do test "compiles code with external libraries" do
Enum.each(@compiler_tests, fn compiler_test -> Enum.each(@compiler_tests, fn compiler_test ->
compiler_version = compiler_test["compiler_version"] compiler_version = compiler_test["compiler_version"]

@ -10,7 +10,7 @@ defmodule Indexer.MixProject do
deps: deps(), deps: deps(),
deps_path: "../../deps", deps_path: "../../deps",
description: "Fetches block chain data from on-chain node for later reading with Explorer.", description: "Fetches block chain data from on-chain node for later reading with Explorer.",
elixir: "~> 1.8", elixir: "~> 1.9",
elixirc_paths: elixirc_paths(Mix.env()), elixirc_paths: elixirc_paths(Mix.env()),
lockfile: "../../mix.lock", lockfile: "../../mix.lock",
preferred_cli_env: [ preferred_cli_env: [

@ -5,7 +5,7 @@
| Dependency | Mac | Linux | | Dependency | Mac | Linux |
|-------------|-----|-------| |-------------|-----|-------|
| [Erlang/OTP 21.0.4](https://github.com/erlang/otp) | `brew install erlang` | [Erlang Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L134) | | [Erlang/OTP 21.0.4](https://github.com/erlang/otp) | `brew install erlang` | [Erlang Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L134) |
| [Elixir 1.8.1](https://elixir-lang.org/) | :point_up: | [Elixir Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L138) | | [Elixir 1.9.0](https://elixir-lang.org/) | :point_up: | [Elixir Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L138) |
| [Postgres 10.3](https://www.postgresql.org/) | `brew install postgresql` | [Postgres Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L187) | | [Postgres 10.3](https://www.postgresql.org/) | `brew install postgresql` | [Postgres Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L187) |
| [Node.js 10.x.x](https://nodejs.org/en/) | `brew install node` | [Node.js Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L66) | | [Node.js 10.x.x](https://nodejs.org/en/) | `brew install node` | [Node.js Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L66) |
| [Automake](https://www.gnu.org/software/automake/) | `brew install automake` | [Automake Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L72) | | [Automake](https://www.gnu.org/software/automake/) | `brew install automake` | [Automake Install Example](https://github.com/poanetwork/blockscout-terraform/blob/33f68e816e36dc2fb055911fa0372531f0e956e7/modules/stack/libexec/init.sh#L72) |

@ -6,6 +6,7 @@ defmodule BlockScout.Mixfile do
def project do def project do
[ [
aliases: aliases(Mix.env()), aliases: aliases(Mix.env()),
version: "2.0",
apps_path: "apps", apps_path: "apps",
deps: deps(), deps: deps(),
dialyzer: [ dialyzer: [
@ -13,7 +14,7 @@ defmodule BlockScout.Mixfile do
plt_add_apps: ~w(ex_unit mix)a, plt_add_apps: ~w(ex_unit mix)a,
ignore_warnings: ".dialyzer-ignore" ignore_warnings: ".dialyzer-ignore"
], ],
elixir: "~> 1.8", elixir: "~> 1.9",
preferred_cli_env: [ preferred_cli_env: [
coveralls: :test, coveralls: :test,
"coveralls.detail": :test, "coveralls.detail": :test,
@ -23,7 +24,17 @@ defmodule BlockScout.Mixfile do
dialyzer: :test dialyzer: :test
], ],
start_permanent: Mix.env() == :prod, start_permanent: Mix.env() == :prod,
test_coverage: [tool: ExCoveralls] test_coverage: [tool: ExCoveralls],
releases: [
blockscout: [
applications: [
block_scout_web: :permanent,
ethereum_jsonrpc: :permanent,
explorer: :permanent,
indexer: :permanent
]
]
]
] ]
end end
@ -61,8 +72,6 @@ defmodule BlockScout.Mixfile do
# and cannot be accessed from applications inside the apps folder # and cannot be accessed from applications inside the apps folder
defp deps do defp deps do
[ [
# Release
{:distillery, "~> 2.0", runtime: false},
# Documentation # Documentation
{:ex_doc, "~> 0.19.0", only: [:dev]}, {:ex_doc, "~> 0.19.0", only: [:dev]},
# Code coverage # Code coverage

Loading…
Cancel
Save