Skip to content

Integrate OBOL x402 payment rollout#377

Draft
bussyjd wants to merge 5 commits intomainfrom
integration/pr339-375-376-obol-usdc
Draft

Integrate OBOL x402 payment rollout#377
bussyjd wants to merge 5 commits intomainfrom
integration/pr339-375-376-obol-usdc

Conversation

@bussyjd
Copy link
Copy Markdown
Collaborator

@bussyjd bussyjd commented Apr 24, 2026

Summary

  • continue the OBOL Permit2 work from feat: add exact OBOL Permit2 buy-side path #339 on top of current main
  • preserve full OBOL Permit2 payment payloads through buy-side auth, sidecar replay, delayed spend confirmation, and autorefill
  • add OBOL token registry/payment metadata support while keeping USDC as the existing baseline
  • add flows/flow-12-obol-payment.sh plus a RELEASE_SMOKE_INCLUDE_OBOL=true release-smoke hook for the OBOL payment path
  • harden flow preflights so smoke runs use the active local stack kubeconfig instead of an ambient Kubernetes context

Supply-chain position

Depends on ObolNetwork/obol-infrastructure#2438, which is the infrastructure/facilitator PR that bumps ghcr.io/x402-rs/x402-facilitator to 1.4.7 and enables the EIP-2612 Permit2 path. This stack PR should land after that facilitator deployment work.

Upstream compatibility

x402-rs/x402-rs:main is at 1.4.7. The relevant upstream changes include DecimalU256 string amount handling and required contract-address validation; this branch signs string amount fields and validates token contracts before signing. flow-12 now validates the expected facilitator source/version when an X402_RS_DIR checkout is used.

Validation

  • bash -n flows/lib.sh flows/flow-11-dual-stack.sh flows/flow-12-obol-payment.sh flows/release-smoke.sh
  • python3 -m py_compile internal/embed/skills/buy-inference/scripts/buy.py
  • go test -tags integration ./internal/openclaw -run TestIntegration_SellBuySidecar_OBOLPermit2 -count=0
  • go test ./internal/x402 ./internal/x402/buyer ./internal/schemas ./internal/serviceoffercontroller ./cmd/obol -count=1
  • live flows/flow-12-obol-payment.sh against a local stack with x402-rs facilitator 1.4.7: passed 7/7, including OBOL Permit2 buy-side auth, x402-buyer sidecar replay, three paid inference requests, and three successful settlements on a Base Sepolia Anvil fork with a fork-local OBOL-compatible token

@bussyjd bussyjd marked this pull request as draft April 24, 2026 12:50
@bussyjd bussyjd force-pushed the integration/pr339-375-376-obol-usdc branch from ca0fe62 to 24b6ee3 Compare April 24, 2026 13:31
@bussyjd
Copy link
Copy Markdown
Collaborator Author

bussyjd commented Apr 24, 2026

Live OBOL Payment Validation

Validated on commit d85ab61.

Results:

  • flows/flow-12-obol-payment.sh: PASS (7/7, flow_rc=0)
  • x402-rs facilitator: 1.4.7 from x402-rs/x402-rs commit 0fe107c
  • Chain context: Base Sepolia Anvil fork, advertised as eip155:84532
  • Payment asset: fork-local OBOL-compatible ERC20Permit token
  • Buyer probe advertised OBOL with transfer: permit2, EIP-712 Obol Network / 1, price 0.001 OBOL per request
  • Buy path signed 3/3 payment authorizations
  • x402-buyer sidecar consumed all auths: remaining=0, spent=3
  • Settlement receipts: 3/3 successful (status=0x1)
  • Balance assertion: buyer -0.003 OBOL, seller +0.003 OBOL
  • Gas benchmark: 342519 total gas, 114173 avg gas/request

CI after the push is green: lint/test and CodeQL checks passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant