Merge pull request #6523 from blockscout/np-fix-address-api-v2

Fix get_implementation_address_hash call
pull/6526/head
Victor Baranov 2 years ago committed by GitHub
commit 1b621c724b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CHANGELOG.md
  2. 4
      apps/block_scout_web/lib/block_scout_web/views/api/v2/address_view.ex

@ -2,7 +2,7 @@
### Features
- [#5561](https://github.com/blockscout/blockscout/pull/5561) - Improve working with contracts implementations
- [#5561](https://github.com/blockscout/blockscout/pull/5561), [#6523](https://github.com/blockscout/blockscout/pull/6523) - Improve working with contracts implementations
- [#6401](https://github.com/blockscout/blockscout/pull/6401) - Add Sol2Uml contract visualization
- [#6481](https://github.com/blockscout/blockscout/pull/6481) - Smart contract verification improvements
- [#6444](https://github.com/blockscout/blockscout/pull/6444) - Add support for yul verification via rust microservice

@ -5,7 +5,7 @@ defmodule BlockScoutWeb.API.V2.AddressView do
alias BlockScoutWeb.API.V2.{ApiView, Helper, TokenView}
alias BlockScoutWeb.API.V2.Helper
alias Explorer.{Chain, Market}
alias Explorer.Chain.Address
alias Explorer.Chain.{Address, SmartContract}
alias Explorer.ExchangeRates.Token
def render("message.json", assigns) do
@ -38,7 +38,7 @@ defmodule BlockScoutWeb.API.V2.AddressView do
{implementation_address, implementation_name} =
with true <- is_proxy,
{address, name} <- Chain.get_implementation_address_hash(address.hash, address.smart_contract.abi),
{address, name} <- SmartContract.get_implementation_address_hash(address.smart_contract),
false <- is_nil(address),
{:ok, address_hash} <- Chain.string_to_address_hash(address),
checksummed_address <- Address.checksum(address_hash) do

Loading…
Cancel
Save