chore: remove `has_methods` from `/addresses` (#10051)
* chore: remove `has_methods_` `read`/`read_proxy`/`write`/`write_proxy` from `/addresses` * chore: move proxy contract test to `smart_contract_controller_test.exs`pull/10059/head
parent
2dd96493bd
commit
6fa60b4e4b
@ -1,31 +0,0 @@ |
||||
defmodule BlockScoutWeb.API.V2.AddressViewTest do |
||||
use BlockScoutWeb.ConnCase, async: true |
||||
|
||||
alias BlockScoutWeb.API.V2.AddressView |
||||
alias Explorer.{Repo, TestHelper} |
||||
|
||||
test "for a proxy contract has_methods_read_proxy is true" do |
||||
implementation_address = insert(:contract_address) |
||||
proxy_address = insert(:contract_address) |> Repo.preload([:token]) |
||||
|
||||
_proxy_smart_contract = |
||||
insert(:smart_contract, |
||||
address_hash: proxy_address.hash, |
||||
contract_code_md5: "123" |
||||
) |
||||
|
||||
implementation = |
||||
insert(:proxy_implementation, |
||||
proxy_address_hash: proxy_address.hash, |
||||
proxy_type: "eip1967", |
||||
address_hashes: [implementation_address.hash], |
||||
names: [nil] |
||||
) |
||||
|
||||
assert implementation.proxy_type == :eip1967 |
||||
|
||||
TestHelper.get_eip1967_implementation_zero_addresses() |
||||
|
||||
assert AddressView.prepare_address(proxy_address)["has_methods_read_proxy"] == true |
||||
end |
||||
end |
Loading…
Reference in new issue