etherscan-api icon indicating copy to clipboard operation
etherscan-api copied to clipboard

Support also other chains using an explorer compatible with etherscan

Open cryptotester opened this issue 1 year ago • 2 comments

Hi,

on my projects I developed a wrapper for etherscan and I was curious to see if there was already an NPM package for this. I found this project.

I've seen you are developing a next gen = new version of this?

If so, please consider also to support other chains using etherscan (rebranded version) e.g.:

  • Fantom (ftmscan)
  • BSC (bscscan)
  • Polygon (polygonscan)
  • Avalanche (snowtrace.io)
  • etc.

Note: not all EVM chains cloned etherscan, so not all EVM chains have an API like those listed above, unluckily. But the API works basically the same in all chains for what I know, maybe in some cases a specific call is not supported, else all same same, only change is the API URL.

I'd help if I had time, but as per usual I'm stressed in my project and will have to implement my wrapper on my own. I think supporting more chains doesn't require too much extra work, basically keep the explorerUrl a variable and replace it based on chain.

Also if using testnet, the suffix will be api-testnet.explorerUrl instead of api.explorerUrl.

Hope this helps, cheers and keep up the good work.

cryptotester avatar Jul 22 '22 12:07 cryptotester

maybe a way to mod the chains would be a way to help you? Can you point me to one documentation of an alternative 'ethrscan'. Maybe a time to resurrect the new branch, based on typescript and much more moddable.

sebs avatar Jul 24 '22 07:07 sebs

@cryptotester would you be able to sponsor this feature request?

sebs avatar Aug 02 '22 09:08 sebs

partly implemented. Would you help to test the other ones if I add them?

sebs avatar Jan 07 '23 12:01 sebs