Skip to content
Fourohtwo

Pre-sign transaction simulation on Base

kr-x402-mvp.kgy5612.workers.dev/crypto/simulate

Pre-sign transaction simulation on Base: run the tx against live state before you sign or broadcast. from=0x..&to=0x..&data=0x..[&value_eth=0.01] or calls=[{to,data,value}] (JSON, up to 5, run in order, e.g. approve then swap). Returns success, decoded revert reason, gas used + fee in ETH/USD, every token and ETH transfer (symbol, decimals applied), net balance_changes per address (and for the sen

BaseAnswering
GEThttps://kr-x402-mvp.kgy5612.workers.dev/crypto/simulate

Uptime100% 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://kr-x402-mvp.kgy5612.workers.dev/crypto/simulate?to=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&data=0xa9059cbb000000000000000000000000a587d73489f8f09d1975f1ddbb1c61c93e8fa9d700000000000000000000000000000000000000000000000000000000000003e8&from=0xe4be4d0bd82d8e68203deff81f79ede0529f2617");
console.log(await res.json());

Example input

{
  "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "data": "0xa9059cbb000000000000000000000000a587d73489f8f09d1975f1ddbb1c61c93e8fa9d700000000000000000000000000000000000000000000000000000000000003e8",
  "from": "0xe4be4d0bd82d8e68203deff81f79ede0529f2617"
}

More from Crypto Microdata for Agents