API Documentation
Base URL: /api/v1
Native Endpoints
All native endpoints accept an optional ?chainId=369|943 query parameter and return {"success":true,"data":...} (or {"success":true,"data":[],"meta":{...}} for lists).
GET /health— Health checkGET /stats— Platform statsGET /networks— Supported networks and compiler versionsPOST /verify— Submit verificationGET /verify/status?guid=...— Verification statusGET /verify/jobs/{id}— Verification job detailsPOST /verify/etherscan— Import from EtherscanGET /contracts— Verified contracts listGET /contracts/{address}— Contract detailsGET /contracts/{address}/abi— ABI JSONGET /contracts/{address}/source— Source code and metadataGET /contracts/{address}/bytecode— Bytecode and creation bytecodeGET /contracts/{address}/events— Events for this contractGET /contracts/{address}/similar— Contracts with identical bytecodeGET /contracts/{address}/dependencies— Imported dependenciesGET /contracts/{a}/diff/{b}— Side-by-side source diffGET /logs— Event logsGET /search?q=...— Search contracts by name/addressGET /source-search?q=...— Full-text search verified source codePOST /decode/calldata— Decode calldataPOST /encode/calldata— Encode function callPOST /simulate— Simulate a transactionPOST /analyze— Static analysis scaffoldingPOST /storage— Storage variable inspectorPOST /deploy/estimate— Estimate deployment gasGET /signature/{selector}— Function signature lookupGET /event-signature/{topic}— Event signature lookupGET /watchtower/subscriptions— List alert subscriptionsPOST /watchtower/subscriptions— Create alert subscription
List Response Format
List endpoints (/contracts, /logs,
/search, /source-search,
/contracts/{address}/events) use the native envelope with
top-level meta:
{"success":true,"data":[...],"meta":{"limit":50,"offset":0,"total":10}}
Etherscan-Compatible Endpoints
These endpoints return the flat {"status":"1","message":"OK","result":...} shape expected by Etherscan clients.
/api?module=contract&action=getabi&address=0x.../api?module=contract&action=getsourcecode&address=0x.../api?module=contract&action=getcontractcreation&contractaddresses=0x.../api?module=contract&action=verifysourcecode/api?module=contract&action=checkverifystatus&guid=.../api?module=contract&action=verifyfrometherscan/api?module=logs&action=getLogs&fromBlock=...&toBlock=...&address=0x...&topic0=0x...
Example
curl "https://contractlab.g4mm4.net/api/v1/contracts/0x..."