dethcrypto/eth-sdk

Doesn't follow all proxies

krzkaczor opened this issue · 1 comments

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.