From 0e895f95f7bfd2354692aa784a8400bcf0add16c Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 11 Mar 2019 19:06:45 +0300 Subject: [PATCH] fix view test --- .../controllers/address_contract_verification_controller.ex | 2 +- .../templates/address_contract_verification/new.html.eex | 6 +++--- .../features/address_contract_verification_test.exs | 3 +-- .../test/support/fixture/smart_contract/solc_bin.json | 3 --- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_verification_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_verification_controller.ex index 3755a4c532..e67f7f0e53 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_verification_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_verification_controller.ex @@ -36,7 +36,7 @@ defmodule BlockScoutWeb.AddressContractVerificationController do {:error, changeset} -> {:ok, compiler_versions} = CompilerVersion.fetch_versions() - render(conn, "new.html", changeset: changeset, compiler_versions: compiler_versions) + render(conn, "new.html", changeset: changeset, compiler_versions: compiler_versions, evm_versions: @evm_versions) end end end diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex index d41abc4fcc..bc12a9e3a5 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex @@ -23,13 +23,13 @@
<%= label f, :compiler_version, gettext("Compiler") %> - <%= select f, :compiler_version, @compiler_versions, class: "form-control", selected: "byzantium", "aria-describedby": "evm-version-help-block" %> - <%= error_tag f, :compiler_version, id: "evm-version-help-block", class: "text-danger" %> + <%= select f, :compiler_version, @compiler_versions, class: "form-control", selected: "latest", "aria-describedby": "compiler-help-block" %> + <%= error_tag f, :compiler_version, id: "compiler-help-block", class: "text-danger" %>
<%= label :evm_version, :evm_version, gettext("EVM Vesion") %> - <%= select :evm_version, :evm_version, @evm_versions, class: "form-control", selected: "latest", "aria-describedby": "compiler-help-block" %> + <%= select :evm_version, :evm_version, @evm_versions, class: "form-control", selected: "byzantium", "aria-describedby": "evm-version-help-block" %>
diff --git a/apps/block_scout_web/test/block_scout_web/features/address_contract_verification_test.exs b/apps/block_scout_web/test/block_scout_web/features/address_contract_verification_test.exs index eab01e0bbc..847febd1c1 100644 --- a/apps/block_scout_web/test/block_scout_web/features/address_contract_verification_test.exs +++ b/apps/block_scout_web/test/block_scout_web/features/address_contract_verification_test.exs @@ -36,8 +36,7 @@ defmodule BlockScoutWeb.AddressContractVerificationTest do contract_name: name, version: version, optimization: false, - source_code: source_code, - evm_version: "byzantium" + source_code: source_code }) |> ContractVerifyPage.verify_and_publish() diff --git a/apps/block_scout_web/test/support/fixture/smart_contract/solc_bin.json b/apps/block_scout_web/test/support/fixture/smart_contract/solc_bin.json index 263ede4fc8..0f72e1ce8a 100644 --- a/apps/block_scout_web/test/support/fixture/smart_contract/solc_bin.json +++ b/apps/block_scout_web/test/support/fixture/smart_contract/solc_bin.json @@ -1,6 +1,3 @@ -// 20190311153836 -// https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/bin/list.json - { "builds": [ {