ethereum-sources-downloader
v0.2.3
Published
Download sources of deployed Ethereum contracts in VSCode
Readme
Ethereum downloader cli
Adapted code from the great https://github.com/dethcrypto/dethcode to be able to download the code of a smart contract locally
Installation
Install from npm
npm i -g ethereum-sources-downloaderInstall from sources
npm i
cd ..
npm i -g ethereum-sources-downloader/Usage
ethereum-sources-downloader {networkId} {contractAddress} {optional:outDir} {-a, --api-version API_VERSION} {-k, --api-key API_KEY}Common arguments between Etherscan API V1 and V2
API_VERSIONis v1 or v2contractAddressin hexadecimal format (i.e 0x1F98431c8aD98523631AE4a59f267346ea31F984)outDirspecifies optionally where the sources will be downloaded relative to current directory
Etherscan API V1
networkId is one of:
- etherscan
- ropsten.etherscan
- rinkeby.etherscan
- goerli.etherscan
- kovan.etherscan
- bscscan
- testnet.bscscan
- hecoinfo
- testnet.hecoinfo
- ftmscan
- testnet.ftmscan
- optimistic.etherscan
- kovan-optimistic.etherscan
- polygonscan
- testnet.polygonscan
- arbiscan
- testnet.arbiscan
- snowtrace
- testnet.snowtrace
- cronoscan
- moonbeam
- aurora
- basescan
- goerli.basescan
Etherscan API V2
networkId is one of the supported chainid listed here
CLI Tool Demo
Demo GIF illustrating the multiple contracts downloading capability which also preserves the directory structure

