abi.ninja icon indicating copy to clipboard operation
abi.ninja copied to clipboard

Problems with anyabi + two stepped detection

Open portdeveloper opened this issue 6 months ago • 1 comments

Is there an existing issue for this?

Current Behavior

Currently when a user types in a contract address, the app:

  1. checks anyabi for an abi
  2. if it can't find it, it checks etherscan
  3. if it still cannot find it, the app changes the view to heimdall + manual abi view

This takes a lot of time and on top of this, anyabi now returns the same abi for any non-existant contract on sepolia.

example: try this address for sepolia: 0x1111111111111111111111111111111111111111

https://github.com/user-attachments/assets/0289e887-70f7-4500-b6e2-9942b919766f

Expected Behavior

I believe that we can have this much better with a very basic custom backend for abi.ninja that would:

  1. return abis from etherscan
  2. detect proxies
  3. decompiles contracts
  4. lets the caller know if contracts are proxies and/or decompiled

Steps To Reproduce

Try this link: https://abi.ninja/0x1111111111111111111111111111111111111111/11155111

Anything else?

Here is a simple backend that does what we want:

https://github.com/portdeveloper/get-abi-2000

with this, we can safely remove the checks for the proxy contracts on the frontend as well as trying to get abis from two sources.

So, please let me know what you think below!

portdeveloper avatar Aug 08 '24 07:08 portdeveloper