{"endpoint":"https://statepulse-api.hahavoid0.workers.dev/agent/preflight","method":"POST","price":"$0.030","description":"One call that pre-flights an onchain transaction for an agent: simulates the call for reverts, checks the sender wallet's native gas balance, and reads current Base gas — returning a single GO/NO_GO verdict with reasons. Replaces 3 separate calls (simulate + balances + gas-history) every agent runs before transacting. Matches: pre-transaction check, agent transaction guard, revert + balance + gas preflight, onchain go/no-go, safe-to-send checker, autonomous trade preflight.","example_input":{"wallet":"0x4a82F147c8A4339409C9097Adc1EedFd56E85bFE","to":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","data":"0x70a082310000000000000000000000000000000000000000000000000000000000000000","chain":"base"},"example_output":{"supported":true,"result":{"decision":"GO","go":true,"reasons":["Simulation passed: transaction does not revert.","Wallet native balance: 0.4200 (can pay gas).","Current avg gas: 0.15 gwei."],"simulation":{"reverted":false},"balance":{"native_balance":"0.4200","usdc_balance":"12.50"},"gas":{"avg_base_fee_gwei":0.15}},"confidence":"high"},"request_schema":{"type":"object","properties":{"wallet":{"type":"string","description":"Sender wallet — checks native gas balance and USDC","examples":["0x4a82F147c8A4339409C9097Adc1EedFd56E85bFE"]},"to":{"type":"string","description":"Target contract address of the transaction to simulate"},"data":{"type":"string","description":"Calldata payload (hex) of the transaction to simulate","examples":["0x70a082310000000000000000000000000000000000000000000000000000000000000000"]},"from":{"type":"string","description":"Simulated sender (defaults to wallet)"},"chain":{"type":"string","description":"base or ethereum","default":"base"}}},"response_schema":{"type":"object"}}