Merge pull request #9309 from blockscout/np-add-more-address-info-to-aa-proxy

Add smart contract and names info to AA response
pull/9314/head
nikitosing 10 months ago committed by GitHub
commit 203e89662c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      CHANGELOG.md
  2. 12
      apps/block_scout_web/lib/block_scout_web/controllers/api/v2/proxy/account_abstraction_controller.ex

@ -8,8 +8,6 @@
### Chore ### Chore
- [#9303](https://github.com/blockscout/blockscout/pull/9303) - Add workflow for Shibarium
<details> <details>
<summary>Dependencies version bumps</summary> <summary>Dependencies version bumps</summary>
@ -24,7 +22,7 @@
- [#9158](https://github.com/blockscout/blockscout/pull/9158) - Increase shared memory for PostgreSQL containers - [#9158](https://github.com/blockscout/blockscout/pull/9158) - Increase shared memory for PostgreSQL containers
- [#9155](https://github.com/blockscout/blockscout/pull/9155) - Allow bypassing avg block time in proxy implementation re-fetch ttl calculation - [#9155](https://github.com/blockscout/blockscout/pull/9155) - Allow bypassing avg block time in proxy implementation re-fetch ttl calculation
- [#9148](https://github.com/blockscout/blockscout/pull/9148) - Add `/api/v2/utils/decode-calldata` - [#9148](https://github.com/blockscout/blockscout/pull/9148) - Add `/api/v2/utils/decode-calldata`
- [#9145](https://github.com/blockscout/blockscout/pull/9145) - Proxy for Account abstraction microservice - [#9145](https://github.com/blockscout/blockscout/pull/9145), [#9309](https://github.com/blockscout/blockscout/pull/9309) - Proxy for Account abstraction microservice
- [#9132](https://github.com/blockscout/blockscout/pull/9132) - Fetch token image from CoinGecko - [#9132](https://github.com/blockscout/blockscout/pull/9132) - Fetch token image from CoinGecko
- [#9131](https://github.com/blockscout/blockscout/pull/9131) - Merge addresses stage with address referencing - [#9131](https://github.com/blockscout/blockscout/pull/9131) - Merge addresses stage with address referencing
- [#9120](https://github.com/blockscout/blockscout/pull/9120) - Add GET and POST `/api/v2/smart-contracts/:address_hash/audit-reports` - [#9120](https://github.com/blockscout/blockscout/pull/9120) - Add GET and POST `/api/v2/smart-contracts/:address_hash/audit-reports`
@ -57,6 +55,7 @@
### Chore ### Chore
- [#9303](https://github.com/blockscout/blockscout/pull/9303) - Add workflow for Shibarium
- [#9233](https://github.com/blockscout/blockscout/pull/9233) - "cataloged" index on tokens table - [#9233](https://github.com/blockscout/blockscout/pull/9233) - "cataloged" index on tokens table
- [#9198](https://github.com/blockscout/blockscout/pull/9198) - Make Postgres@15 default option - [#9198](https://github.com/blockscout/blockscout/pull/9198) - Make Postgres@15 default option
- [#9197](https://github.com/blockscout/blockscout/pull/9197) - Add `MARKET_HISTORY_FETCH_INTERVAL` env - [#9197](https://github.com/blockscout/blockscout/pull/9197) - Add `MARKET_HISTORY_FETCH_INTERVAL` env

@ -153,7 +153,17 @@ defmodule BlockScoutWeb.API.V2.Proxy.AccountAbstractionController do
defp address_info_from_hash_string(address_hash_string) do defp address_info_from_hash_string(address_hash_string) do
with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string),
{:ok, address} <- Chain.hash_to_address(address_hash, [], false) do {:ok, address} <-
Chain.hash_to_address(
address_hash,
[
necessity_by_association: %{
:names => :optional,
:smart_contract => :optional
}
],
false
) do
Helper.address_with_info(address, address_hash_string) Helper.address_with_info(address, address_hash_string)
else else
_ -> address_hash_string _ -> address_hash_string

Loading…
Cancel
Save