blockscout / blockscout

Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
http://docs.blockscout.com
GNU General Public License v3.0
3.32k stars 2.25k forks source link

New `address_names` is not displayed on contract re-verification via standard json #10290

Open rimrakhimov opened 1 week ago

rimrakhimov commented 1 week ago

Description

When contract is re-verified via standard json method, the contract name displayed under contract details section is not updated image

That happens because the previous name is not removed from address_names table and the new name is stored along with the previous one.

$ select * from address_names where address_hash='\x009BcE26c6812c559aFf5EB5769C8758701673d2'::bytea;

                address_hash                |     name     | primary |        inserted_at         |         updated_at         | metadata |   id    
--------------------------------------------+--------------+---------+----------------------------+----------------------------+----------+---------
 \x009bce26c6812c559aff5eb5769c8758701673d2 | tzBTCAdapter | f       | 2024-05-29 21:28:11.913141 | 2024-05-29 21:28:11.913141 |          | 3605977
 \x009bce26c6812c559aff5eb5769c8758701673d2 | MyOFTAdapter | f       | 2024-05-30 12:19:56.571838 | 2024-05-30 12:19:56.571838 |          | 3609589
(2 rows)

Type of the installation

Helm charts (k8s)

Type of the JSON RPC archive node

Erigon

Type of the chain

No response

Link to the page

No response

Steps to reproduce

No response

Backend version

v6.6.0

Frontend version

No response

Elixir & Erlang/OTP versions

Elixir 1.14.5

Operating system

No response

Additional information

No response