scan_contract_selectors
Inspect EVM contract bytecode to extract 4-byte function selectors and flag high-risk privileged functions such as transferOwnership, upgradeTo, mint, and selfdestruct.
Instructions
Stage 1 Free ($0.00) deterministic EVM bytecode inspector that extracts 4-byte function selectors and flags privileged backdoors (transferOwnership, upgradeTo, mint, selfdestruct). Queries live RPC for chain_id (8453 Base, 84532 Base Sepolia, 42161 Arbitrum) unless bytecode_override (0x hex) is supplied for offline analysis; falls back to empty bytecode on RPC error. Returns JSON with is_contract, bytecode_size_bytes, selectors_found, high_risk_selectors, risk_level (HIGH, LOW, EOA), and recommendation.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"target_address": "<target_address>"
},
"name": "scan_contract_selectors"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain_id | No | EVM Chain ID (8453 for Base Mainnet, 84532 for Base Sepolia, 42161 for Arbitrum One) | |
| target_address | Yes | Hex EVM address of smart contract to inspect (e.g. '0x4200000000000000000000000000000000000006') | |
| bytecode_override | No | Optional raw contract runtime bytecode hex string (0x...) for offline analysis without RPC calls |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | No | ||
| stage | No | ||
| chain_id | No | ||
| cost_usd | No | ||
| risk_level | Yes | ||
| is_contract | Yes | ||
| recommendation | No | ||
| target_address | Yes | ||
| selectors_found | Yes | ||
| bytecode_size_bytes | No | ||
| high_risk_selectors | Yes |