[Template] Update x402 template#109
Conversation
| "dependencies": { | ||
| "@metamask/x402": "^0.1.0", | ||
| "@x402/core": "^2.12.0", | ||
| "@x402/evm": "^2.12.0", |
There was a problem hiding this comment.
@metamask/x402 declares the following peer dependencies:
"@x402/core": "^2.12.0",
"@x402/evm": "^2.12.0",
"viem": "^2.31.4"
I think you'll need to add @x402/evm back in, along with viem (viem is just used to validate the address in the server side, maybe we should remove that dependency 🤔
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c9da301. Configure here.
|
Ran a static pass on the x402 template update and found one blocking packaging issue.
import { paymentMiddleware } from "@x402/express";But the template package now drops That means a user who generates the Patch direction is either:
No payment headers, wallets, private endpoints, or live facilitator calls were used for this pass. |

Description
Note
Medium Risk
Updates payment scheme wiring and network/facilitator defaults in the x402 server template, which can affect payment enforcement and compatibility. Risk is moderate since changes are confined to a template but touch core payment configuration.
Overview
Updates the Node
x402-servertemplate to use@metamask/x402’sx402ExactEvmErc7710ServerSchemeinstead of the custom local ERC-7710 scheme implementation (and removessrc/scheme.ts).Switches default configuration from Base mainnet to Base Sepolia (
eip155:84532) and updates the exampleFACILITATOR_URLaccordingly, alongside dependency updates (adds@metamask/x402/viem, drops@x402/express, and aligns@types/nodeto v18).Reviewed by Cursor Bugbot for commit 1e7b169. Bugbot is set up for automated code reviews on this repo. Configure here.