Preflight any Base transaction before you sign it
preflight.madebydevx.com/v1/preflight
Preflight any Base transaction before you sign it: simulates the call against latest state (success or decoded revert reason), estimates gas with a safe limit, and prices the full fee (L2 execution + L1 data upper bound) in ETH and USD, plus the ETH balance needed. 0.50 USDC via x402 on Base.
POST
https://preflight.madebydevx.com/v1/preflightUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://preflight.madebydevx.com/v1/preflight", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"data":"0x70a08231000000000000000000000000b3cddccee6b150c8effd55b961afc0ecefe7f247","from":"0xB3cDDccEe6B150c8efFD55B961afc0Ecefe7f247","to":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","value":"0"}),
});
console.log(await res.json());Example input
{
"data": "0x70a08231000000000000000000000000b3cddccee6b150c8effd55b961afc0ecefe7f247",
"from": "0xB3cDDccEe6B150c8efFD55B961afc0Ecefe7f247",
"to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"value": "0"
}