Proxy contracts and blockchain explorers (EtherScan)

I was reading this good article by Jack Tanner about different EIPs for upgradeable contract standards.

This question popped in my mind: Is there a way to signal proxy contract ABI for blockchain explorers like EtherScan, so that the contract users would have better visibly what transactions happen through a proxy contract?

Ps. Unrelated: the EOS decision to make all contract code upgradeable by default, having opt-in for immutable code seems wise as hindsight, as the EOS method is less complex.


Hi @miohtama,

I am not aware of a way to signal to blockchain explorers that a contract is a Proxy contract via the ABI.

The blockchain explorers could check for known slots (as per the EIPs).

Hey @miohtama! Unfortunately there is no way for a contract to signal it is a proxy (there is a proposed method in EIP897, but I think it’s not widely implemented). This means that, unfortunately, each block explorer needs to implement custom code for each proxy implementation they want to support.

As for Etherscan, they recently added support for flagging a contract as a proxy, so you could use its implementation ABI when interacting with it. They support a few different proxy types, such as EIP1967 (by checking the content of those specific storage slots) and EIP1167 (by checking the exact assembly). @kvrnc may be able to provide further info.


@spalladino This is good info!

Are you aware of any live proxies with Etherscan support? I could check out how it looks like in their user interface.

Absolutely! Here is an ERC20 token which is set up as a proxy. Note that you have two tabs: Read Contract and Read as Proxy. Both will query the proxy contract, but the latter will use the ABI of its implementation.

1 Like