base / base/skills

Feature proposal: opt-in x402 transaction preflight before Base send_calls

Open
#159 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
119
Forks
125
Avg merge
22h 30m
Merged PRs (30d)
2

Description

The OpenSea plugin already turns external API responses into unsigned calls and hands them to Base MCP `send_calls`. The Brickken plugin also demonstrates that Base MCP can buy an arbitrary POST resource through `initiate_x402_request` / `complete_x402_request`. Would maintainers be open to an opt-in, name-gated transaction-preflight step that combines those two existing capabilities?

## Concrete first integration

Limit the first version to a single Base transaction in `skills/base-mcp/plugins/opensea.md`, after OpenSea returns `{to, data, value_hex}` and before `send_calls`:

```text
get_wallets -> OpenSea prepare/quote -> optional paid preflight -> send_calls approval
```

The proposed paid request is:

```json
POST https://jarvis-orderflow-router.yl124915300.workers.dev/v1/outcomes/tx-execution-preflight
{
"chain": "base",
"from": "",
"to": "",
"value": "",
"calldata": ""
}
```

It is a third-party x402 endpoint priced at $0.008 USDC. The Base MCP call can set `maxPayment` to that exact cap. The service returns `PAY`, `REVIEW`, or `REJECT` plus reason codes after checking point-in-time balance, allowance, nonce, target classification, `eth_call`, and gas estimation.

Suggested behavior:

- Run only on Base (`chain == "base"`) and only when the user explicitly asks for Jarvis/preflight; no default routing or directory change.
- `PAY`: continue to the existing `send_calls` approval flow.
- `REVIEW`: show the reasons and require an explicit user decision before creating the transaction approval.
- `REJECT`: stop before `send_calls` unless the user explicitly overrides.
- Preserve the existing Base Account approval for the x402 purchase and the transaction itself.
- Treat the result as point-in-time evidence, not a guarantee of execution.

## Why this fits a real buyer flow

This is not a request to add x402 support in the abstract. The OpenSea plugin already executes third-party calldata through a real Base Account approval path, while Base MCP already has a configurable paid POST buyer path. The proposed insertion point has every field the preflight needs and sits immediately before the irreversible action.

I am proposing an issue rather than a PR because the contribution policy currently limits PRs to the Base core team. If this direction is acceptable, would you prefer the first version to stay in the OpenSea plugin, or be documented as a reusable name-gated pattern for Base-only `send_calls` plugins?

Contributor guide

Open the contributing guide

Research direction

Start by reading skills/base-mcp/plugins/opensea.md and comparing the Brickken plugin's initiate_x402_request and complete_x402_request flow. Done means an explicitly requested, Base-only preflight can handle PAY, REVIEW, and REJECT before send_calls while preserving both approval steps and presenting the result as point-in-time evidence.

Written by the indexing model from the issue text.

Assessment

Domain
api, blockchain, payments
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.