Get Contract Source
get_contract_sourceVerified contract source code, compiler version, optimization settings, and license.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Chain slug or chain ID (default ethereum) | |
| address | Yes | Contract address |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| abi | No | ABI string or null | |
| runs | No | Number of optimization runs or null | |
| proxy | No | Whether contract is a proxy | |
| address | Yes | The queried contract address | |
| chain_id | Yes | Numeric chain ID | |
| verified | Yes | Whether contract is verified on Etherscan | |
| chain_name | Yes | Human-readable chain name or null | |
| source_code | No | Source code or null | |
| license_type | No | SPDX license type or null | |
| contract_name | No | Name of the contract | |
| implementation | No | Implementation address if proxy, else null | |
| compiler_version | No | Solidity compiler version used | |
| optimization_used | No | Whether compiler optimization was enabled | |
| constructor_arguments | No | Constructor arguments or null |