{"uid":"cap_GLowBUosCsxDajMxW5tj5","slug":"transaction-pre-flight-check-15729529","name":"Transaction Pre-flight Check","description":"Will this transaction go through? Six checks before any gas is spent: gas vs balance, full simulation with the revert reason decoded, stuck nonces, contract or wallet recipient, ERC-20 allowance, and a sanctions screen of the counterparty. Returns send / do not send with every reason.","url":"https://api.eucompliance.tools/x402/preflight?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["sender","to"],"properties":{"to":{"type":"string","description":"contract or wallet being called"},"data":{"type":"string","description":"calldata hex, default 0x"},"chain":{"enum":["base","ethereum","arbitrum","optimism","polygon"],"type":"string"},"token":{"type":"string","description":"optional ERC-20 to check balance/allowance for"},"amount":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"exact token amount intended; decimal string preferred"},"sender":{"type":"string","description":"the wallet that would send"},"spender":{"type":"string","description":"optional spender, defaults to 'to'"},"value_eth":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"exact native value to attach; decimal string preferred"}}}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dTdBIIZu-5YqRcScfsb3G","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs six pre-send checks on a blockchain transaction—gas vs balance, full simulation with decoded revert reason, stuck nonces, recipient type, ERC-20 allowance, and sanctions screening—and returns a send/do-not-send verdict with all reasons.","exampleAgentPrompt":"Before I send this transaction from 0xAbC...123 to the contract 0xDEF...456 on Base with 0.5 ETH attached, run a full pre-flight check—simulate the call, verify I have enough gas, confirm the recipient isn't sanctioned, and tell me whether it's safe to send.","exampleUseCases":[{"title":"DeFi swap safety check","prompt":"I'm about to swap 1000 USDC for ETH on Base using wallet 0xABC...111 calling contract 0xDEF...222—can you simulate the transaction, check my allowance and balance, and confirm the contract isn't flagged before I approve anything?"},{"title":"NFT mint revert diagnosis","prompt":"My NFT mint transaction from 0x111...AAA to the minting contract 0x222...BBB on Ethereum keeps failing—can you simulate it with the calldata 0xa0712d68... and tell me exactly why it reverts so I don't waste more gas?"},{"title":"Sanctions screen before payment","prompt":"Before I send 500 USDC to wallet 0x999...ZZZ on Polygon, check if that address is on any sanctions list and whether my nonce is clear—I don't want the transaction blocked or flagged."}],"resultDescription":"A structured verdict (send / do not send) accompanied by the result of each of the six checks: gas coverage, transaction simulation with decoded revert reason if applicable, nonce status, recipient classification (contract vs EOA), ERC-20 allowance adequacy, and sanctions screening outcome for the counterparty. Any failing check includes a human-readable reason.","failureModes":["Missing required 'sender' or 'to' query parameters returns a 400 error","Unsupported chain value outside the allowed enum causes a validation error","Simulation may time out for complex contracts on congested networks","Sanctions data may have brief staleness windows between list updates","ERC-20 checks require 'token' and 'amount' params; omitting them skips that sub-check","Node RPC errors for the target chain may cause simulation failures with a service error response"],"whenToPreferThis":"Choose this endpoint when you need a comprehensive go/no-go decision on a transaction before committing gas, especially when you want simulation, sanctions, allowance, and nonce checks in a single call rather than querying separate APIs. Prefer it over basic gas estimation when revert diagnosis, AML compliance, or counterparty risk are also concerns. It is particularly valuable for DeFi automation, payment agents, and any workflow where a failed or sanctioned transaction would cause downstream problems.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T06:34:32.987Z","isFirstParty":false,"canonicalSlug":"transaction-pre-flight-check-15729529"}