This repository has been archived by the owner on Sep 28, 2023. It is now read-only.
Documentation of contract detail API method (/api/scan/evm/contract
) does not explain the value of external_libraries
field when linked libraries are used
#48
Labels
documentation
Improvements or additions to documentation
Issue
The documentation for the contract detail API method contains an example of output to demonstrate its use. However, this example has
external_libraries: null
. Presumably that means this contract does not use linked libraries. Unfortunately this example leaves the reader with no idea of what the value ofexternal_libraries
would be if the contract in question did use linked libraries. This should be documented.Background
So, I'm asking about this because I work for Truffle and we have a package,
@truffle/source-fetcher
, which allows one to automatically download verified contract source code from either Etherscan or Sourcify. (It feeds into another package,@truffle/fetch-and-compile
, which then recompiles the verified source.) We'd like to potentially expand this to other services, such as Subscan. (We have an issue open for it here.) To add Subscan, we'd need to know how the relevant API works; it seems mostly pretty self explanatory, butexternal_libraries
is a big question.Normally in a case like this I'd determine the answer by just deploying a test contract, verifying it myself, and trying out the API on it; but Subscan only supports verification on a few particular networks, and most of those aren't testnets, so they don't have faucets from which I could get ether (or the local equivalent) which which to deploy a test contract. The two that are testnets (Pangolin and Pangoro), I couldn't get the faucet to work. That's not your issue, obviously, but it did prevent me from just testing it out myself. (I initially mistakenly thought that you supported verification on Moonbase Alpha as well, but it appears that's not the case; which is just as well, while I could get the faucet to work there I ran into other issues with deployment on that network (that are also unrelated to you, to be clear)).
So, I tried to get an answer to this question one more way, by finding a contract already verified on Subscan which uses linked libraries, and seeing what the results are for that. I couldn't find a single one!
So I have no idea how this field works. Any help here (ideally in the form of updating the documentation) would be appreciated.
Thank you!
The text was updated successfully, but these errors were encountered: