eth-sdk icon indicating copy to clipboard operation
eth-sdk copied to clipboard

Doesn't follow all proxies

Open krzkaczor opened this issue 3 years ago • 1 comments

https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1#code

krzkaczor avatar Feb 25 '22 21:02 krzkaczor

There are two approaches to this.

  1. Currently, Etherscan knows it's a proxy and we don't. We could use &action=getsourcecode instead of action=getabi when calling Etherscan to receive the implementation address in Implementation field alongside the ABI in ABI field. We already have code for this in Ethereum Code Viewer / Dethcode.

  2. A solution agnostic about ABI source: In this particular case, we'd need to replicate

 address target = addressManager[address(this)].getAddress(
  (implementationName[address(this)])
);

And I'm not sure if this one is feasible. There is only a constructor and a fallback in the ABI, both implementationName mapping and addressManager mapping are private.

hasparus avatar Mar 02 '22 14:03 hasparus