Expand description
§Contract Source Code Retrieval
Fetches verified contract source code, ABI, compiler settings, and
metadata from block explorer APIs (Etherscan getsourcecode).
§Etherscan Free Tier
The getsourcecode endpoint is available on the free tier (5 calls/sec).
It returns: SourceCode, ABI, ContractName, CompilerVersion,
OptimizationUsed, Runs, ConstructorArguments, EVMVersion,
Library, LicenseType, Proxy, Implementation, SwarmSource.
Structs§
- AbiEntry
- A single ABI entry (function, event, or constructor).
- AbiParam
- An ABI parameter (input or output).
- Contract
Source - Full contract source information from a block explorer.
- Source
File - A source file extracted from multi-file source code.
Functions§
- extract_
source_ files - Extract individual source files from Etherscan’s source code response.
- fetch_
contract_ source - Fetch full contract source code and metadata from Etherscan.