|
|
|
@ -49,17 +49,19 @@ defmodule BlockScoutWeb.AddressContractVerificationTest do |
|
|
|
|
test "with invalid data shows error messages", %{session: session, bypass: bypass} do |
|
|
|
|
Bypass.expect(bypass, fn conn -> Conn.resp(conn, 200, solc_bin_versions()) end) |
|
|
|
|
|
|
|
|
|
address = insert(:address) |
|
|
|
|
|
|
|
|
|
session |
|
|
|
|
|> ContractVerifyPage.visit_page("0x1e0eaa06d02f965be2dfe0bc9ff52b2d82133461") |
|
|
|
|
|> ContractVerifyPage.visit_page(address) |
|
|
|
|
|> ContractVerifyPage.fill_form(%{ |
|
|
|
|
contract_name: "", |
|
|
|
|
version: nil, |
|
|
|
|
optimization: nil, |
|
|
|
|
contract_name: "name", |
|
|
|
|
version: "default", |
|
|
|
|
optimization: "true", |
|
|
|
|
source_code: "", |
|
|
|
|
evm_version: "byzantium" |
|
|
|
|
}) |
|
|
|
|
|> ContractVerifyPage.verify_and_publish() |
|
|
|
|
|> assert_has(ContractVerifyPage.validation_error()) |
|
|
|
|
|> ContractVerifyPage.has_message?("There was an error validating your contract, please try again.") |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
defp solc_bin_versions do |
|
|
|
|