Pre-Sign EVM Hex Calldata Selector Decoder & Drain Simulator
simulate_evm_transaction_calldataDecodes raw EVM hexadecimal transaction calldata (0x...) by 4-byte function selector to expose hidden ERC-20 approve/transferFrom calls, setApprovalForAll drains, and multicall bundles. Use when auditing raw hex transaction data (to, value, data) before broadcasting an on-chain EVM transaction; for inspecting off-chain EIP-712 JSON typed-data signatures, use decode_eip712_permit_signature instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'calldata_hex' ('network' defaults to 'base_mainnet'), supports '?demo=true' or L402 (20 sats), and returns HTTP 400 if invalid.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| network | No | Target EVM network for simulation context; defaults to 'base_mainnet' when omitted. | |
| calldata_hex | Yes | Hexadecimal EVM transaction data string starting with '0x' (e.g. '0x095ea7b3000000000000000000000000...'). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector_hex | Yes | Extracted 4-byte function selector (e.g. '0x095ea7b3'). | |
| decoded_method | Yes | Human-readable ABI function signature matched to the selector. | |
| simulation_verdict | Yes | Pre-sign safety recommendation ('SAFE_CALLDATA' or 'HIGH_RISK_APPROVAL_DETECTED'). | |
| approval_or_drain_risk | Yes | True if the call grants token/NFT allowances or transfers assets to an untrusted target. |