What problem does it solve?
Provides a reproducible local environment to develop, test, and debug x402 payments without touching real funds or external networks by forking Base mainnet state and running a local facilitator that verifies and settles payments.
Core Features & Use Cases
- Forked Chain Environment: Launches one or more Anvil instances that fork Base networks so contracts (like USDC) have realistic state.
- Local Facilitator Server: Runs an HTTP facilitator exposing /verify, /settle, /supported, and /health endpoints to validate and execute x402 payments locally.
- Developer Tooling: Includes CLI commands to start the environment, mint USDC to any address, check balances, and a Testcontainers module for integration tests.
- Use Case: Build and integration-test an x402-enabled dApp by running a local Anvil fork, funding test accounts with USDC, verifying payment payloads, and settling transactions without real assets.
Quick Start
Start the local facilitator and Anvil fork by running npx x402-fl dev.