Skip to content

Commit e31e4db

Browse files
committed
docs(x402): bump demo-2 (trove-advisor) @x402 deps to ^2.11.0
1 parent 31f8288 commit e31e4db

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

src/content/docs/docs/developers/getting-started/musd-payments-x402/trove-advisor.mdx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,19 @@ cd apps/trove-advisor
103103
pnpm install
104104
```
105105

106-
The `package.json` pulls `@x402/core`, `@x402/evm`, `@x402/express`,
107-
`@x402/fetch`, `@anthropic-ai/sdk`, `express`, `viem`, `dotenv`, and
108-
a `pnpm.overrides` entry that pins `@x402/evm` to the Mezo preview
109-
tarball (`mezo.7` — a newer tarball than Demo 1 ships, with the
110-
dynamic-price hooks). Only `@x402/evm` needs the override — same
111-
principle as Demo 1.
106+
The `package.json` pulls `@x402/core`, `@x402/evm` (`^2.11.0`),
107+
`@x402/express`, `@x402/fetch`, `@anthropic-ai/sdk`, `express`, `viem`,
108+
and `dotenv`. Canonical `@x402/evm 2.11.0+` ships with built-in Mezo
109+
support and the dynamic-price `DynamicPrice` hooks this demo uses, so
110+
MUSD formatting, Mezo-specific constants, and per-request pricing
111+
resolve correctly with no overrides. `@x402/core`, `@x402/express`,
112+
and `@x402/fetch` are the same packages on every chain; Mezo support
113+
comes in through the `@x402/evm` scheme plugin you register at runtime.
114+
115+
If `pnpm install` resolved `@x402/evm` to a `2.10.x` version through a
116+
transitive dependency, apply the `^2.11.0` pin from
117+
[Quickstart Step 6](./x402-quickstart/#step-6-apply-library-overrides)
118+
before continuing.
112119

113120
## Step 2: Configure `.env`
114121

@@ -293,7 +300,7 @@ directly to its operator's wallet; the host just runs the routing.
293300
| `CLIENT_PRIVATE_KEY environment variable is required` | `.env` not created or pasted in the wrong directory | `cp .env.example .env` inside `apps/trove-advisor/`; fill in both `CLIENT_PRIVATE_KEY` and `ANTHROPIC_API_KEY` |
294301
| `invalid_transaction_state` in the `PAYMENT-RESPONSE` header | Transient Mezo testnet facilitator flake (Permit2 warmup on the first call per fresh signer session) | The agent retries up to 4 times with backoff. If it still fails, check `curl https://facilitator.vativ.io/health` and rerun |
295302
| `WARNING: mUSD not approved for Permit2` | Account A has not granted Permit2 allowance on MUSD | Apply [Demo 1 Step 1](./agentic-joke-buyer/#step-1-one-time-permit2-approval) |
296-
| `does not provide an export named 'DEFAULT_STABLECOINS'` | `pnpm.overrides` is not forcing `@x402/evm` through the preview tarball | Confirm the `pnpm.overrides` block is present and points at `2.10.0-mezo.7` (Demo 2's tarball is one patch ahead of Demo 1's `mezo.6`); then `pnpm install` |
303+
| `does not provide an export named 'DEFAULT_STABLECOINS'` | `@x402/evm` resolved to a pre-`2.11.0` version through a transitive dependency | Apply the `^2.11.0` pin from [Quickstart Step 6](./x402-quickstart/#step-6-apply-library-overrides); then `pnpm install` |
297304
| `Error: Unsupported chain ID: 31611` | `viem` doesn't know Mezo Testnet | Upgrade `viem` to `2.47.10+` (the lock file pins `2.47.12`; a stale lockfile elsewhere can pull an old copy) |
298305
| `401` from Anthropic in the agent log | `ANTHROPIC_API_KEY` missing, invalid, or out of credit | Regenerate at [console.anthropic.com](https://console.anthropic.com); confirm the `sk-ant-…` prefix |
299306
| Agent calls `get_liquidation_queue` with `limit: 5` and server returns 2 rows | On-chain `SortedTroves` currently has fewer than `limit` troves | Expected — settlement is reduced via `Settlement-Overrides`; no error |

0 commit comments

Comments
 (0)