Skip to content

chore: bump viem floor to ^2.48.11 across monorepo + refresh lockfiles#2242

Merged
phdargen merged 1 commit intox402-foundation:mainfrom
ryanRfox:chore/viem-floor-bump
May 8, 2026
Merged

chore: bump viem floor to ^2.48.11 across monorepo + refresh lockfiles#2242
phdargen merged 1 commit intox402-foundation:mainfrom
ryanRfox:chore/viem-floor-bump

Conversation

@ryanRfox
Copy link
Copy Markdown
Contributor

@ryanRfox ryanRfox commented May 8, 2026

Description

Closes #2241

Tightens the viem floor in every package.json that lists viem (41 refs across 40 files), refreshes all three lockfiles so every direct viem resolution reads 2.48.11, and regenerates the paywall bundled templates so the EVM/SVM/AVM bundles match the new viem chain database.

Why floor-tightening matters

PR #2013 bumped lockfiles to 2.47.14, but later PRs (#2061, #2197, others) added sub-packages with ^2.39.x / ^2.43.x floors. pnpm re-resolved on subsequent installs and the solver picked the lowest acceptable version across constraints. ^-ranges with low floors don't preserve a bump — lockfile refreshes erode the floor.

This PR fixes that incomplete tightening from #2013 by raising every floor to ^2.48.11.

Gate criterion for future PRs: new viem-using package.json files must use ^2.48.11 (or tighter). Without a tight floor, the same regression recurs.

Lockfile state

Workspace Pre-bump direct viem Post-bump direct viem
typescript/ 2.47.12 2.48.11
examples/typescript/ 2.40.3, 2.43.5 2.48.11
e2e/ 2.31.6, 2.40.3, 2.45.1 2.48.11

Transitive viem from @walletconnect/utils (2.23.2) is unaffected and remains pinned by walletconnect's own constraints.

Files changed

  • Every package.json in the monorepo that lists viem as a direct dep — 40 files, 41 refs.
  • 3 workspace lockfiles refreshed: typescript/pnpm-lock.yaml, examples/typescript/pnpm-lock.yaml, e2e/pnpm-lock.yaml.
  • 9 paywall bundled template files regenerated via pnpm --filter @x402/paywall run build:paywall (3 each for EVM/SVM/AVM in TS, Python, and Go).
  • 1 changeset entry under typescript/.changeset/.

Related

Tests

  • pnpm install --frozen-lockfile clean across typescript/, examples/typescript/, and e2e/.
  • pnpm format:check, lint:check, build, test green for typescript/ (23/23 tasks each).
  • pnpm format:check and lint:check green for examples/typescript/ (42/42 tasks each).
  • examples/typescript/ build clean for all viem-using packages. Pre-existing build failures in @x402/next-example and @x402/miniapp-example are unrelated to viem and tracked separately.
  • Every direct viem entry in all three refreshed lockfiles resolves to 2.48.11.
  • Paywall bundled templates regenerated via pnpm --filter @x402/paywall run build:paywall; CI's check-paywall-template regen-and-diff gate passes.

Checklist

  • I have formatted and linted my code
  • All new and existing tests pass
  • My commits are signed (required for merge) -- you may need to rebase if you initially pushed unsigned commits
  • I added a changelog fragment for user-facing changes (docs-only changes can skip)

AI disclosure

This PR used an agentic coding workflow and was reviewed by Ryan R. Fox (an actual human) before posting.

Tightens the viem floor in every package.json that lists viem (41 refs
across 40 files), refreshes all three lockfiles so every direct viem
resolution reads 2.48.11, and regenerates the paywall bundled templates
so the EVM/SVM/AVM bundles match the new viem chain database.

## Why floor-tightening matters

PR x402-foundation#2013 bumped lockfiles to 2.47.14, but later PRs (x402-foundation#2061, x402-foundation#2197, ...)
added sub-packages with ^2.39.x / ^2.43.x floors. pnpm re-resolved on
subsequent installs and the solver picked the lowest acceptable version
across constraints. ^-ranges with low floors do NOT preserve a bump --
lockfile refreshes erode the floor.

This PR fixes that incomplete tightening from x402-foundation#2013 by raising every
floor to ^2.48.11. The same regression will recur if any future PR adds
a viem-using sub-package with a lower floor. Gate criterion: new
packages must use ^2.48.11 (or tighter) for viem.

## Acceptance verification

- pnpm install --frozen-lockfile clean across typescript/,
  examples/typescript/, and e2e/.
- pnpm format:check, lint:check, build, test green for typescript/.
- pnpm format:check, lint:check green for examples/typescript/.
- All direct viem resolutions read 2.48.11 in all three workspaces.
- Paywall bundled templates regenerated via
  pnpm --filter @x402/paywall run build:paywall.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

@ryanRfox is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added typescript go sdk Changes to core v2 packages examples Changes to examples python legacy Changes to legacy sdk or examples website labels May 8, 2026
@phdargen phdargen self-assigned this May 8, 2026
Copy link
Copy Markdown
Collaborator

@phdargen phdargen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ryanRfox, LGTM 🚀

@phdargen phdargen merged commit ee7c156 into x402-foundation:main May 8, 2026
15 of 16 checks passed
ryanRfox added a commit to ryanRfox/x402 that referenced this pull request May 8, 2026
…BLECOINS

Makes the e2e harness portable to any EVM chain in the SDK's
DEFAULT_STABLECOINS catalog. The visible knob is --evm-network=<caip2>;
the rest is the plumbing that makes the knob actually work.

Four interlocking pieces:

1. CLI override - --evm-network=<caip2> selects the EVM chain for a run.
   Mode-default behavior preserved when the flag is omitted.

2. SDK-imported chain registry - EVM_NETWORK_CONFIGS is derived from
   DEFAULT_STABLECOINS at module load via Object.fromEntries(...), replacing
   the prior 10-entry hand-curated table. New SDK chains propagate after
   pnpm install with no harness edit.

3. Removes Base Sepolia hardcodes - EIP-712 token names in the four EVM
   resource servers (express, fastify, hono, next/proxy) move to a per-server
   EVM_PERMIT2_ASSET_NAMES lookup keyed by EVM_NETWORK. The Permit2 approval
   script reads its target from the resolved network config. The mock
   facilitator advertises the full scheme set (exact, upto, batch-settlement)
   and gates non-EVM kinds on env presence.

4. EVM-only credential gating - an EVM-only run (--families=evm) no longer
   requires Solana, Aptos, Hedera, or Stellar wallets. The harness's
   existing requiredEnvByFamily post-filter check (test.ts line ~660)
   handles this uniformly across all five families; the unconditional
   EVM+SVM gate that fired before scenario filtering and over-required both
   families is removed.

resolveViemChain(caip2) looks up viem's chain database; for chains viem
hasn't packaged it falls through to defineChain({ name: 'EVM <id>',
rpcUrls: { default: { http: [] } } }) and the caller supplies EVM_RPC_URL.
With the viem floor at ^2.48.11, every chain currently in DEFAULT_STABLECOINS
is in viem's catalog, so the fallback is for forward-compatibility with
future SDK chains that out-pace viem.

evmRpcUrl(caip2) resolves in three tiers: EVM_RPC_URL env override -> viem
chain default -> ''. getNetworkSet(mode, evmCaip2?) accepts an optional
CAIP-2 EVM override that overlays the mode default's EVM slot from
EVM_NETWORK_CONFIGS.

Migration: CI configurations that set per-chain RPC URL env vars (e.g.,
BASE_SEPOLIA_RPC_URL) must migrate to the unified EVM_RPC_URL. The harness
selects the chain via --evm-network=<caip2> (or the mode default) and reads
RPC override from EVM_RPC_URL only. No impact on SDK consumers using the
published packages.

The complementary monorepo-wide viem floor bump is in x402-foundation#2242.
ryanRfox added a commit to ryanRfox/x402 that referenced this pull request May 8, 2026
…BLECOINS

Makes the e2e harness portable to any EVM chain in the SDK's
DEFAULT_STABLECOINS catalog. The visible knob is --evm-network=<caip2>;
the rest is the plumbing that makes the knob actually work.

Four interlocking pieces:

1. CLI override - --evm-network=<caip2> selects the EVM chain for a run.
   Mode-default behavior preserved when the flag is omitted.

2. SDK-imported chain registry - EVM_NETWORK_CONFIGS is derived from
   DEFAULT_STABLECOINS at module load via Object.fromEntries(...), replacing
   the prior 10-entry hand-curated table. New SDK chains propagate after
   pnpm install with no harness edit.

3. Removes Base Sepolia hardcodes - EIP-712 token names in the four EVM
   resource servers (express, fastify, hono, next/proxy) move to a per-server
   EVM_PERMIT2_ASSET_NAMES lookup keyed by EVM_NETWORK. The Permit2 approval
   script reads its target from the resolved network config. The mock
   facilitator advertises the full scheme set (exact, upto, batch-settlement)
   and gates non-EVM kinds on env presence.

4. EVM-only credential gating - an EVM-only run (--families=evm) no longer
   requires Solana, Aptos, Hedera, or Stellar wallets. The harness's
   existing requiredEnvByFamily post-filter check (test.ts line ~660)
   handles this uniformly across all five families; the unconditional
   EVM+SVM gate that fired before scenario filtering and over-required both
   families is removed.

resolveViemChain(caip2) looks up viem's chain database; for chains viem
hasn't packaged it falls through to defineChain({ name: 'EVM <id>',
rpcUrls: { default: { http: [] } } }) and the caller supplies EVM_RPC_URL.
With the viem floor at ^2.48.11, every chain currently in DEFAULT_STABLECOINS
is in viem's catalog, so the fallback is for forward-compatibility with
future SDK chains that out-pace viem.

evmRpcUrl(caip2) resolves in three tiers: EVM_RPC_URL env override -> viem
chain default -> ''. getNetworkSet(mode, evmCaip2?) accepts an optional
CAIP-2 EVM override that overlays the mode default's EVM slot from
EVM_NETWORK_CONFIGS.

Migration: CI configurations that set per-chain RPC URL env vars (e.g.,
BASE_SEPOLIA_RPC_URL) must migrate to the unified EVM_RPC_URL. The harness
selects the chain via --evm-network=<caip2> (or the mode default) and reads
RPC override from EVM_RPC_URL only. No impact on SDK consumers using the
published packages.

The complementary monorepo-wide viem floor bump is in x402-foundation#2242.
ryanRfox added a commit to ryanRfox/x402 that referenced this pull request May 8, 2026
…BLECOINS

Makes the e2e harness portable to any EVM chain in the SDK's
DEFAULT_STABLECOINS catalog. The visible knob is --evm-network=<caip2>;
the rest is the plumbing that makes the knob actually work.

Four interlocking pieces:

1. CLI override - --evm-network=<caip2> selects the EVM chain for a run.
   Mode-default behavior preserved when the flag is omitted.

2. SDK-imported chain registry - EVM_NETWORK_CONFIGS is derived from
   DEFAULT_STABLECOINS at module load via Object.fromEntries(...), replacing
   the prior 10-entry hand-curated table. New SDK chains propagate after
   pnpm install with no harness edit.

3. Removes Base Sepolia hardcodes - EIP-712 token names in the four EVM
   resource servers (express, fastify, hono, next/proxy) move to a per-server
   EVM_PERMIT2_ASSET_NAMES lookup keyed by EVM_NETWORK. The Permit2 approval
   script reads its target from the resolved network config. The mock
   facilitator advertises the full scheme set (exact, upto, batch-settlement)
   and gates non-EVM kinds on env presence.

4. EVM-only credential gating - an EVM-only run (--families=evm) no longer
   requires Solana, Aptos, Hedera, or Stellar wallets. The harness's
   existing requiredEnvByFamily post-filter check (test.ts line ~660)
   handles this uniformly across all five families; the unconditional
   EVM+SVM gate that fired before scenario filtering and over-required both
   families is removed.

resolveViemChain(caip2) looks up viem's chain database; for chains viem
hasn't packaged it falls through to defineChain({ name: 'EVM <id>',
rpcUrls: { default: { http: [] } } }) and the caller supplies EVM_RPC_URL.
With the viem floor at ^2.48.11, every chain currently in DEFAULT_STABLECOINS
is in viem's catalog, so the fallback is for forward-compatibility with
future SDK chains that out-pace viem.

evmRpcUrl(caip2) resolves in three tiers: EVM_RPC_URL env override -> viem
chain default -> ''. getNetworkSet(mode, evmCaip2?) accepts an optional
CAIP-2 EVM override that overlays the mode default's EVM slot from
EVM_NETWORK_CONFIGS.

Migration: CI configurations that set per-chain RPC URL env vars (e.g.,
BASE_SEPOLIA_RPC_URL) must migrate to the unified EVM_RPC_URL. The harness
selects the chain via --evm-network=<caip2> (or the mode default) and reads
RPC override from EVM_RPC_URL only. No impact on SDK consumers using the
published packages.

The complementary monorepo-wide viem floor bump is in x402-foundation#2242.
ryanRfox added a commit to ryanRfox/x402 that referenced this pull request May 8, 2026
…BLECOINS

Makes the e2e harness portable to any EVM chain in the SDK's
DEFAULT_STABLECOINS catalog. The visible knob is --evm-network=<caip2>;
the rest is the plumbing that makes the knob actually work.

Four interlocking pieces:

1. CLI override - --evm-network=<caip2> selects the EVM chain for a run.
   Mode-default behavior preserved when the flag is omitted.

2. SDK-imported chain registry - EVM_NETWORK_CONFIGS is derived from
   DEFAULT_STABLECOINS at module load via Object.fromEntries(...), replacing
   the prior 10-entry hand-curated table. New SDK chains propagate after
   pnpm install with no harness edit.

3. Removes Base Sepolia hardcodes - EIP-712 token names in the four EVM
   resource servers (express, fastify, hono, next/proxy) move to a per-server
   EVM_PERMIT2_ASSET_NAMES lookup keyed by EVM_NETWORK. The Permit2 approval
   script reads its target from the resolved network config. The mock
   facilitator advertises the full scheme set (exact, upto, batch-settlement)
   and gates non-EVM kinds on env presence.

4. EVM-only credential gating - an EVM-only run (--families=evm) no longer
   requires Solana, Aptos, Hedera, or Stellar wallets. The harness's
   existing requiredEnvByFamily post-filter check (test.ts line ~660)
   handles this uniformly across all five families; the unconditional
   EVM+SVM gate that fired before scenario filtering and over-required both
   families is removed.

resolveViemChain(caip2) looks up viem's chain database; for chains viem
hasn't packaged it falls through to defineChain({ name: 'EVM <id>',
rpcUrls: { default: { http: [] } } }) and the caller supplies EVM_RPC_URL.
With the viem floor at ^2.48.11, every chain currently in DEFAULT_STABLECOINS
is in viem's catalog, so the fallback is for forward-compatibility with
future SDK chains that out-pace viem.

evmRpcUrl(caip2) resolves in three tiers: EVM_RPC_URL env override -> viem
chain default -> ''. getNetworkSet(mode, evmCaip2?) accepts an optional
CAIP-2 EVM override that overlays the mode default's EVM slot from
EVM_NETWORK_CONFIGS.

Migration: CI configurations that set per-chain RPC URL env vars (e.g.,
BASE_SEPOLIA_RPC_URL) must migrate to the unified EVM_RPC_URL. The harness
selects the chain via --evm-network=<caip2> (or the mode default) and reads
RPC override from EVM_RPC_URL only. No impact on SDK consumers using the
published packages.

The complementary monorepo-wide viem floor bump is in x402-foundation#2242.
ryanRfox added a commit to ryanRfox/x402 that referenced this pull request May 8, 2026
…BLECOINS

Makes the e2e harness portable to any EVM chain in the SDK's
DEFAULT_STABLECOINS catalog. The visible knob is --evm-network=<caip2>;
the rest is the plumbing that makes the knob actually work.

Four interlocking pieces:

1. CLI override - --evm-network=<caip2> selects the EVM chain for a run.
   Mode-default behavior preserved when the flag is omitted.

2. SDK-imported chain registry - EVM_NETWORK_CONFIGS is derived from
   DEFAULT_STABLECOINS at module load via Object.fromEntries(...), replacing
   the prior 10-entry hand-curated table. New SDK chains propagate after
   pnpm install with no harness edit.

3. Removes Base Sepolia hardcodes - EIP-712 token names in the four EVM
   resource servers (express, fastify, hono, next/proxy) move to a per-server
   EVM_PERMIT2_ASSET_NAMES lookup keyed by EVM_NETWORK. The Permit2 approval
   script reads its target from the resolved network config. The mock
   facilitator advertises the full scheme set (exact, upto, batch-settlement)
   and gates non-EVM kinds on env presence.

4. EVM-only credential gating - an EVM-only run (--families=evm) no longer
   requires Solana, Aptos, Hedera, or Stellar wallets. The harness's
   existing requiredEnvByFamily post-filter check (test.ts line ~660)
   handles this uniformly across all five families; the unconditional
   EVM+SVM gate that fired before scenario filtering and over-required both
   families is removed.

resolveViemChain(caip2) looks up viem's chain database; for chains viem
hasn't packaged it falls through to defineChain({ name: 'EVM <id>',
rpcUrls: { default: { http: [] } } }) and the caller supplies EVM_RPC_URL.
With the viem floor at ^2.48.11, every chain currently in DEFAULT_STABLECOINS
is in viem's catalog, so the fallback is for forward-compatibility with
future SDK chains that out-pace viem.

evmRpcUrl(caip2) resolves in three tiers: EVM_RPC_URL env override -> viem
chain default -> ''. getNetworkSet(mode, evmCaip2?) accepts an optional
CAIP-2 EVM override that overlays the mode default's EVM slot from
EVM_NETWORK_CONFIGS.

Migration: CI configurations that set per-chain RPC URL env vars (e.g.,
BASE_SEPOLIA_RPC_URL) must migrate to the unified EVM_RPC_URL. The harness
selects the chain via --evm-network=<caip2> (or the mode default) and reads
RPC override from EVM_RPC_URL only. No impact on SDK consumers using the
published packages.

The complementary monorepo-wide viem floor bump is in x402-foundation#2242.
ryanRfox added a commit to ryanRfox/x402 that referenced this pull request May 8, 2026
…BLECOINS

Makes the e2e harness portable to any EVM chain in the SDK's
DEFAULT_STABLECOINS catalog. The visible knob is --evm-network=<caip2>;
the rest is the plumbing that makes the knob actually work.

Four interlocking pieces:

1. CLI override - --evm-network=<caip2> selects the EVM chain for a run.
   Mode-default behavior preserved when the flag is omitted.

2. SDK-imported chain registry - EVM_NETWORK_CONFIGS is derived from
   DEFAULT_STABLECOINS at module load via Object.fromEntries(...), replacing
   the prior 10-entry hand-curated table. New SDK chains propagate after
   pnpm install with no harness edit.

3. Removes Base Sepolia hardcodes - EIP-712 token names in the four EVM
   resource servers (express, fastify, hono, next/proxy) move to a per-server
   EVM_PERMIT2_ASSET_NAMES lookup keyed by EVM_NETWORK. The Permit2 approval
   script reads its target from the resolved network config. The mock
   facilitator advertises the full scheme set (exact, upto, batch-settlement)
   and gates non-EVM kinds on env presence.

4. EVM-only credential gating - an EVM-only run (--families=evm) no longer
   requires Solana, Aptos, Hedera, or Stellar wallets. The harness's
   existing requiredEnvByFamily post-filter check (test.ts line ~660)
   handles this uniformly across all five families; the unconditional
   EVM+SVM gate that fired before scenario filtering and over-required both
   families is removed.

resolveViemChain(caip2) looks up viem's chain database; for chains viem
hasn't packaged it falls through to defineChain({ name: 'EVM <id>',
rpcUrls: { default: { http: [] } } }) and the caller supplies EVM_RPC_URL.
With the viem floor at ^2.48.11, every chain currently in DEFAULT_STABLECOINS
is in viem's catalog, so the fallback is for forward-compatibility with
future SDK chains that out-pace viem.

evmRpcUrl(caip2) resolves in three tiers: EVM_RPC_URL env override -> viem
chain default -> ''. getNetworkSet(mode, evmCaip2?) accepts an optional
CAIP-2 EVM override that overlays the mode default's EVM slot from
EVM_NETWORK_CONFIGS.

Migration: CI configurations that set per-chain RPC URL env vars (e.g.,
BASE_SEPOLIA_RPC_URL) must migrate to the unified EVM_RPC_URL. The harness
selects the chain via --evm-network=<caip2> (or the mode default) and reads
RPC override from EVM_RPC_URL only. No impact on SDK consumers using the
published packages.

The complementary monorepo-wide viem floor bump is in x402-foundation#2242.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

examples Changes to examples go legacy Changes to legacy sdk or examples python sdk Changes to core v2 packages typescript website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: viem version floors are too loose — pnpm re-resolves to older versions on every lockfile refresh

2 participants