⏬🚀 Fetch the most up-to-date sources of verified Smart Contracts (including proxy implementations) from Etherscan in seconds!
- Fetch the sources of a contract from an address and save it to
sources/ContractName/:
npx etherscan-src 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984- Note that if a standard proxy is detected, the proxy's implementation sources will be fetched instead:
npx etherscan-src 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9- You can optionally provide a
targetdirectory path, an EtherscanapiKey(to bypass the default query rate limit), or specify anetworkon which to query the Smart Contract's source code (by name or chainId, decimal or hexadecimal):
npx etherscan-src --target sources/uniswap/ \
--apiKey ... \
--network polygon \
0xb33EaAd8d922B1083446DC23f610c2567fB5180fnpm install etherscan-srcyarn add etherscan-src