mix raxol_payments.anvil (Raxol Payments v0.2.0)

Copy Markdown View Source

Reproducible launch-rehearsal harness. Brings up:

  1. An anvil node (local devchain or a fork of a real network)
  2. The x402 echo server (Raxol.Payments.EchoServer)

Both stay running until you Ctrl-C the task. Anvil's stdout is streamed inline so you can see block production + tx receipts.

mix raxol_payments.anvil
mix raxol_payments.anvil --fork-url https://mainnet.base.org
mix raxol_payments.anvil --anvil-port 8545 --echo-port 4002

Options

  • --fork-url external RPC URL to fork (omit for local devchain)
  • --anvil-port anvil port, default 8545
  • --echo-port echo server port, default 4002
  • --echo-amount echo server price in atomic USDC units (default 10_000 = $0.01)
  • --block-time anvil block time in seconds (default 1)
  • --chain-id chain id, default 31337 (anvil default; ignored when forking)
  • --no-echo skip the echo server (anvil only)

Next steps after start

In another terminal:

cd packages/raxol_payments
export PREFLIGHT_TARGET_URL=http://localhost:4002/anything
mix run examples/preflight.exs

Requires

anvil on $PATH (Foundry). If anvil is missing, the task aborts with a clear error before starting anything else.