1

am trying to write a custom interface for a public smart contract not owned by me. The contract used in official docs of the project is this ERC1967Proxy contract. ABI of that is not really useful and what I am interested is the ABI of inner logic contract (I have recovered the address). How do I go about that?

The important thing is that the contract are on Avalanche C-chain and I can't use Etherem-related tools like ethscan. Avascan doesn't seem to have as many features. Basically

Also appreciate any comments about if it is easier to recover the abi from the frontend artifact build with webpack (map files do exist).

1 Answer 1

1

Sticky one. Usually when existing functionality no longer supports basic implementation requirements it can leave you in a difficult position. Either wait for the current iteration to be upgraded or try something yourself with the understanding it's 100% experimental.

If the contract is open source and the source code is available, you should be able to extract the ABI from the source code by compiling it using a Solidity compiler.

If you have access to the frontend artifact built with Webpack, you may be able to find the ABI in the map files. However, this will depend on how the artifact was built and whether the ABI is included in the map files. It may be worth trying to look through the map files to see if the ABI is present, but it is not a guarantee that you will be able to find it this way.

1
  • The source code isn't available unfortunately. It would have been trivial otherwise. I tried looking into the artifacts quite a lot but possibly not deep enough. Tried manually checking with chromium dev-tools first Tested this repo: github.com/rarecoil/unwebpack-sourcemap manage to restore most of it but missing hardhat directory. Also tried using grep with keywords like "contract", "payable" etc but got nothing meaningful.
    – bihinchee
    Commented Jan 8, 2023 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.